LinuxInstruct: Tutorials: Common Linux/Unix Commands

19 Mar

LinuxInstruct: Tutorials: Common Linux/Unix Commands


Table of Common Commands

Command Description Example
cd Change Directory Command # cd testdirectory
clear Clear screen/window # clear
copy Copy a group of files/directories # copy test/ /etc/
cp similar to copy, only one file or directory at a time # cp index.html /home/httpd/html/
date Shows the time and date. allows root to change either # date
df reports global filesystem utilization # df
diff Compares two files and outputs the differences # diff file file.bak
diff3 like diff, except for 3 files instead of 2 # diff3 file1 file2 file3
dircmp like diff, except for directories instead # dircmp /usr/local/sbin /usr/sbin
du displays disk usage in Kbytes # du file1
echo reports the text to standard output # echo “Hello World”
file reports the type of file # file mydoc.txt
find locates a certain file # find [location to start search, usually /] [file/directory to search for]
finger Reports user info, name, home dir, shell, logons, mail, and the users plan # finger [user name]
grep searches results for expression # grep [expression]
head displays the first few lines of a file, default 5 # head /etc/inetd.conf
kill kills the process # kill [pid]
killall kills the processes with name # killall [name]
ln Link to a file or directory, the -s option creates a soft link # ln -s [target] [destination]
man Displayes the manual page for a command # man [command]
mkdir Create a new directory # mkdir [directory name]
mount mount a file system or disk # mount [device] [target] (mount /dev/fd0 /mnt/floppy, mounts the floppy drive)
mv move or rename a file or directory # mv myfile.txt report.txt
umount unmounts a file system or drive # umount [device] (umount /dev/fd0, unmounts the floppy drive)
Leave a comment

Posted by on March 19, 2009 in Mongolia


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: