Alright, I was going to write a Linux Guide ages ago, but I just haven't had the time.
I will add stuff to it from time to time.
I didn't use Linux very often in the past. It became my daily used OS when I found out that 64bit Linux is quite fast for Boinc and I have been using it every day from that day on.
There are some nice features I am sure not everybody is aware of, so I will try to summarize a few commands that might be handy for everyday use.
First some basic stuff:
Linux is a case sensitice OS, which means Boinc.txt and boinc.txt are 2 different files, so watch out.
Most of you will have Ubuntu or Fedora installed with all their GUIs and stuff. But you can do a lot more stuff with the terminal.
To open one you have to right click on the desktop or press the "start" button in the task bar and select "Run command" or something similar.
It depends on what distro you are using, so there a zillion different names for it. It might also be called shell,console,konsole or terminal. Remember commands are also case sensitive.
Now you should have opened up a dos kinda prompt you can do all kinda stuff with.
Here are some basic commands (commands are in " ", usage is without " "):
To change directories use "cd".
Example: You are in /root and want to enter the BOINC folder, you have to type "cd BOINC"
If you are in a different folder and want to enter the BOINC folder, you have to write the complete path. Ex: "cd /root/BOINC"
To move up one directory, use "cd .."
If you want to know what path you are in right now, type in "pwd". It displays the full path you are in.
"ls" lists you all files that are in the folder you are in.
"cp" file destination copies a file to the destination folder.
"mkdir" creates a directory
"mv" does the same as cp, but it doesnt copy, it moves.
"rm" Removes files and directories. To use rm without a hassle you may want to use "rm -rf". This way you won't be prompted to confirm the removal of the file. You can not use rm to remove directories which are not empty unless you use an option telling rm to do otherwise, the -rf option works well for this. Use "rm -rf" carefully!
"rmdir" removes empty directories
"top" that is your task manager. Displays cpu and memory usage and processes with their IDs.
The feature no.3 in my eyes is "man". "man" displays the man page for a paticular application or command. You can even use "man man", which displays you the usage of man.
If you know how a command is called, but dont now how it is used, use man.
Use "shift+page up/down" to scroll up/down.
The second best linux feature is auto-completion. Simply use "tab" key to use it Ex: You are in /root and want to enter the BOINC folder. If there is no other folder called B*, you just have to type in "cd B" and press tab. Give it a try, its great
Pressing "control + c" sends the kill signal to the running process and ends it immediately. That works for every app or command. If a application is stuck, you have to type in "top" in a console to see its process ID. Exit "top" by pressing "crt+c" or "q" and type in "kill ProcessID" to kill the stuck process.
Of course you can run any app from the terminal. Ex: "firefox" will open Firefox if it has been installed. Notice that you can only run one app per terminal session. If you start them with a "&" behind it, you can open multiple apps. Ex: "firefox&".
njkid was a little bit confused about the following: After you start a command and its still running, i.e the boinc client, then you can type in whatever you want without any effect. You see if something is running when the computer name and the folder you are in disappears.
Unzipping files:
You might need to unzip files while you are in textmode only. Most packages you can install are tar,gzip or bzip2 files.
untar/gzipping a file. The following will decompress .tar.gz and .tgz files. cd into the dir with the file/s then type "tar zxvf yourfile.tar.gz" or "tar zxvf yourfile.tgz".
un-tar a .tar: cd into the dir with the file/s then type "tar xvf yourfile.tar".
un-gzip a fileType: "gzip -d filename.gz".
un-bzip2 a fileType: "bzip2 -d filename.bz2".
tar plus gzip a dir/multiple files: cd into the dir of the files you want to tar(warning, this will put ALL files of the current dir you're in into a tar file), type "tar cvf newTarFile.tar * ". Now to gzip the file, type "gzip -9 newTarFile.tar".
Compiling and installing software:
Linux software often comes as source code only, so you have to compile it.
First you have to unzip the file to a directory (see above how to do that).
After that you have to cd into the folder. Now type in "./configure" and after that "make".
It creates the make files depending on what hardware you are running. To finally install the software you have to be logged in as root. If you are not logged in as root, use "su" to root (you have to enter your root password). Now a "make install" will install the software.
To install src.rpm you have to be root and in the same folder again. Tpye "rpm --rebuild --target i686" Now watch for where the actual rpm was placed (look at last few lines on the screen or scroll up a tiny bit). cd into the dir with the new rpm or cp it to where you are at ("cp /path/to/rpm ."). Now do "rpm -Uvh file.rpm".
Installing a regular RPMcd into the dir that the rpm you want to install is in. su to root (type "su" press enter, enter in your root password, press enter). Type "rpm -Uvh filename.rpm" and press enter.
You can also install stuff without having to download it first manually, which is feature no.1 in my eyes.
You can let it search for the latest software for your OS and let it install automaitally.
Depending on what distro you are using, the commands have different names.
For Gentoo its "emerge -av whatever".
Fedora users use "yum install whatever" and "yum update" to update all installed packages.
Debian based distros use "apt-get install whatever"
Thats the best feature ever. If you need several libs for the app to run, they are also being downloaded and installed.
Now some more advanced stuff:
Most of you are using Fedora/Ubuntu which starts X right after login. Gentoo boots in text-only mode first and lets you start whatever you want automatically.
To get into text only mode you can type in "init 3" in a terminal if you are using Fedora. Now it should shut down X and run text-only mode.
To boot into text-only mode every time, you have to enter grub (if you are using grub as bootmanager) Press the "a"-key while grub is starting. You will see a line somewhat like the following:
kernel /vmlinuz-2.6.9-1.667 ro root=LABEL=/ acpi=on rhgb quiet
Add the number of your runlevel to the end of that line, and then press Enter. For example, to boot into text-only mode, the line would look like:
kernel /vmlinuz-2.6.9-1.667 ro root=LABEL=/ acpi=on rhgb quiet 3
You will then boot into the new runlevel this time only.
Now you can login with you username and pw with only the prompt running.
To start X (your graphical frontend) again, all you should have to do is enter "startx". If that doesn't work, try "startkde", "startxfce4" or "init 5". If that still doesn't do it. Edit Grub again and remove the 3.
There are more ways to get into text-mode only. njkid32 found a nice page, that explains it really well.
http://www.fedorafaq.org/basics/#runlevel
While you are in text-only mode (or also if you are running X), you can press "crt+alt+Fkeys" to change "tabs". Its like opening several terminals under X. You can also press "crt+alt+F1" while running X to get into a text-only terminal. To go back to X you have to press "crt+alt+F7, F8 or F9", depends on how X is set up. You can also switch between tabs in text-only mode by pressing "alt+arrowkeyleft" and "alt+arrowkeyright".
How to run Boinc in text-only mode:
cd into the BOINC folder.
"./boinc" runs the text-only mode boinc client. I have no experience running it that way yet, but you can control it remotely. Will add how to do that as soon as I figured out how.
If you want to run the benchmarks, type in "./boinc -run_cpu_benchmarks".
If you want to start boinc with the highest priority for the benchmark, you have to run "nice -n -20 ./boinc -run_cpu_benchmarks".
After the benchmark is done, boinc resumes work. For more options use "./boinc -help"
How to manage Boinc without the manager in text-only mode:
You have to use "./boinc_cmd" to send commands to the running boinc client.
There are quite a lot of command you can use. "./boinc_cmd --help" shows all of them.
There are only a few that need to be used, so I wont explain everything in detail.
"./boinc_cmd --get_state" shows the state of all WUs, application version and all kind of misc information, but unfortunately you wont be able to scroll up far enough to see the state of the running WUs.
To see everything you have to use "./boinc_cmd --get_state | less".
You can scroll up/down using the arrow keys and quit to the prompt pressing "q" or "ctrl+c".
"./boinc_cmd --show_results" only shows the WUs and its state.
active_task_state:1 means its running, 0 if its not running.
"./boinc_cmd --get_messages seqno" shows the messages. You can use "./boinc_cmd --get_messages seqno | less" again if you cant scroll up to the beginning of the messages.
"./boinc_cmd --run_benchmarks" runs the benchmark.
Those are the most important commands. To set run-mode and network mode use "./boinc_cmd --set_run_mode x" and "./boinc_cmd --set_network_mode x" where x is either always, auto or never.
Remember that you can always start X and use the boinc manager to manage boinc. It will still be running, even if you close the manager.
Thats everything I can think of at the moment. I will constantly add more stuff to it and make it more readable. Notice this is V0.2.
Bookmarks