Some Common Linux Commands

Command			Meaning
passwd			changes your password
logout			ends you UNIX session
ls -la			lists all files in current directory
ls -la | more		lists all files in current directory screen by screen
touch filename		creates a new file
cp firstfile secondfile	copies firstfile into secondfile
mv firstfile secondfile	renames firstfile to secondfile
rm filename		removes or deletes filename file
rm -i filename		asks you if you want to delete filename before 
     			deleting it
mkdir directoryname	makes a new directory called directoryname
mv dir1 dir2		copies contents of directory1 files into directory2
rmdir dir1 dir2		removes or deletes directory1 and directory2
rmdir directoryname	removes or deletes directoryname
rm -r directoryname	removes or deletes directoryname and its contents
pwd			shows where you are in a directory (pathname)
cd directoryname	changes the current directory to directoryname
cd ~			changes the current directory to your home directory
cd   or   cd ..		changes the current directory to your home directory
cat filename		displays the contents of filename
more filename		displays the contents of a long file called filename
head filename		displays the first few lines of a file called 
			filename
tail filename		displays the last few lines of a file called 
			filename
who			displays everyone that is currently logged in
whoami			displays information about yourself
finger			displays information about everyone who is logged in
finger userid		displays information about a specific userid
w			displays what each user is currently doing
write userid		allows one-way communication with userid
talk userid		allows two-way communication with userid
man subject		shows help about a particular subject or command
date			displays the current date
cal			displays the current monthly calendar
cal 7 1967		displays the monthly calendar for July 1967
set noclobber		prevents overwriting of files
unset noclobber		cancels the set noclobber command
jobs -l			displays what jobs are currently running
kill jobnumber		kills the jobnumber obtained by jobs -l
quota -v			displays how much storage space you have left
du -ks			displays total storage space in K occupied by all 
			your files
diff file1 file2		displays if file1 differs from file2
compress bigfile		compresses the file bigfile
uncompress bigfile	uncompresses the file bigfile
vi filename		creates a file called filename by using the vi editor
lp filename		prints a file on the printer
lpr [options] filename	allows controlled printing of filename on the printer
lpq -l			displays information about the files in the print 
			queue
lprm jobnumber 		removes a file with jobnumber before it is printed
lprm userid		removes all files of userid
cancel jobnumber	cancels jobnumber that the lp command sent to print
lpstat -a all		lists the status of all printers
Creative Commons License Valid CSS Valid XHTML 1.0 Driven by DokuWiki Powered by PHP Powered by Apache get firefox!! kgareth.com Recent changes RSS feed