| command | explanation |
cd | change directory command |
cd / | change to root directory |
cd ~ or cd | change to your home directory |
cd .. | change up one directory |
cd ../.. | change up two directories |
clear | clear the screen (teacher's coming..) |
df | show disk freespace |
df -m | show disk usage in megabytes |
pwd | print working directory (shows current directory with full path) |
ls | list directory contents |
ls -la | list all details including hidden files (begin with a .) |
find / -name filename | find a file (or directory), systemwide search |
alias command(s) | create an alias |
mv | move (note also used to rename) |
cp | copy |
cp -priv dirname | copy a directory |
rm | remove (delete) |
rmdir | delete a directory |
rm -fr | delete a directory which is not empty |
mkdir | create a directory |
touch | create a file |
ln | create a symlink |
chmod | change permissions on file/directory |
chown | change ownership of file/directory |
more filename | view clear text file, one page at a time |
vi, pico, emacs filename | edit filename (text editors) |
su | swap user (login as another user) |
adduser | add a new user |
rmuser | delete a user |
cat /etc/passwd | list user accounts on system |
passwd user | change user's password (passwd alone changes your password) |
who | who is currently logged on |
whoami | who am I logged on as (handy after su command) |
exit | exit from shell (or from previous su) (esp. telnet/ssh session) |
logout | log out of system (from console) |
man command | manual page for stated command |
pciconf -lv | diagnostic utility for the PCI bus |
pkg_info | show installed packages |
ps | show system processes |
ps -aux | show system processes in detail |
ps -aux | grep pname | show specific process name (pname) |
top | list all processes, starting with those taking the most CPU time |
kill [process id] | kill a specific running process (by process id number) |
kill -9 [process id] | kill a stubborn process (take that, muthaf-) |
command & | run a command in the background |
nice command & | run command in the background at a reduced priority |
date | change system date and time |
crontab | schedule system tasks |
ifconfig | show IP Address information |
hostname | show computername |
shutdown | shuts down the system |
reboot | reboots the system |