Professional Documents
Culture Documents
echo $SHELL
clear
cd / - root directory
cd /usr
cd local/bin
pwd - show parent working directory
cd .. previous directory - one back
cd .. /share -in the current dir, go to a folder named share
jobs -l == list current jobs
ps au - cpu util
ps al
ps ax / ps a/ ps x
ps x --forest [pareny child process displayed]
top === displays a continuously updated process listing
fg == To get the process "un-stopped" and running again, we can bring it to the foreground with the
bash built-in fg
bg == continue it in the background with the bash built-in bg
lsmod == list of currently loaded modules
uname -a = System info about OS
$ nice -n 10 oggenc /tmp/song.wav ===set the priority of a process - change the priority of a
process when you start it
renice 10 641====change the niceness setting of a running process
$ ls -l /bin/bash
-rwxr-xr-x 1 root wheel
430540 Dec 23 18:27 /bin/bash
The first triplet represents permissions for the owner of the file, the second represents permissions
for the file's group, and the third represents permissions for all other users
vi == i - insert, esc :q = quit, esc :wq save and quit
q = interrupt a process
whoami -tells the current user
groups == current group
whatis ls
$ sort <<END
apple
cranberry
banana
END
echo Hi > myfile == overwrites file
$ echo there. >> myfile == appends to file
Linix Boot > BIOS reads MBR > MBR Master boot record (info about the location of the Kernel)
> loads kernel into memory > after kernel loads, it calls program called init > init boots rest of the
distribution > init starts program called getty > getty displays the login screen
Maintenance of MBR Bootloader 2 types : GRUB (Grand Unified Bootloader) and LILO(LInux
Loader)
f the error occurred while the kernel was loading or probing hardware devices, you can retrieve a
copy of the kernel's log using thedmesg command or /var/log/messages
grep named /var/log/messages | tail -3
cd /var/log
tail messages
tail -f /var/log/messages
$ cd
// same as above, default for "cd" is home directory
$ cd ~/Documents // Change directory to the sub-directory "Documents" of the home directory
of the current user
$ cd ..
// Change directory to the parent directory of the current working directory
$ cd // Change directory to the previous working directory (OLDPWD)