Basic command reference for UNIX/Linux
Linux/UNIX command | Description | MS-DOS equivalent |
./foo | start foo (allocated in current dir.) | foo |
/ ¯ | previous / next command | doskey |
cd x (or cd /x) | go to directory x | cd |
cd .. (or cd ../ or cd /..) | go down one directory | cd.. |
x then [tab] <beep> [tab] | view all commands starting with x | - |
adduser | add a user to the system | / |
ls (or dir) | list a directory | dir |
cat | view a textfile on the terminal | type |
mv x y | move or rename file x to file y | move |
cp x y | copy file x to file y | copy |
rm x | delete a file | del |
mkdir x | make a directory | md |
rmdir x | remove a directory | rd |
rm -r x | remove directory x and all its underlying files | deltree |
rm p | remove a package | - |
df (or df x) | Show free space on device x | chkdsk ? |
top | view memory status (q to quit) | mem |
man x | get a manual page about command x | / |
less x | view text file x (note that the more filter works under Linux too!) | type x |more |
echo | print something on the screen | echo |
mc | Norton Commander for UNIX | nc |
mount | to couple a device (e.g. CD-ROM, umount to uncouple) | - |
halt | to shutdown | - |
reboot ([ctrl] + [alt] + [del]) | to restart | [ctrl] + [alt] + [del] |
Advanced commands
chmod <permissions> <file> | Change file permissions |
ls -l x | Perform a detailed directory listing for file x |
ln -s x y | Make a symbolic link from x to y |
find x -name y -print | find file y, begin the search from within directory x and print the results to the screen |
ps | to view all running processes |
kill x | to terminate process x (x is PID from ps) |
[alt] + F1 - F7 | switch to terminal 1 - 7 (in text terminal; F7 = X-Windows (when started)) |
lilo | to make a boot disk |
Terminology
symlink | Symbolic link to another file or directory. Like Win95's shortcuts |
shell script | Like MS-DOS's batchfiles; perform a series of commands after another. |
X-Windows
startx | to start X-windows |
[ctrl] + [alt] + [backsp] | to quit X during trouble |
[ctrl] + [alt] + F1 - F6 | to switch to text terminal 1 - 6 (in X-windows) |
xf86Config | most primitive setup/configurator for x (in text terminal) |
Xconfigurator | another configurator for X in text terminal |
xf86Setup | an X-Windows configurator for X |
configX | to configure Metro-X server |