You are on page 1of 3

Linux Quick Reference Linux Quick Reference Linux Quick Reference

SOME USEFUL COMMANDS SOME USEFUL COMMANDS SOME USEFUL COMMANDS

Command Task Command Task Command Task Command Task Command Task Command Task
File/Directory Basics File Location File/Directory Basics File Location File/Directory Basics File Location
ls List files find Locate files ls List files find Locate files ls List files find Locate files
cp Copy files slocate Locate files via index cp Copy files slocate Locate files via index cp Copy files slocate Locate files via index
mv Rename files which Locate commands mv Rename files which Locate commands mv Rename files which Locate commands
rm Delete files whereis Locate standard files rm Delete files whereis Locate standard files rm Delete files whereis Locate standard files
ln Link files ln Link files ln Link files
File Text Manipulation File Text Manipulation File Text Manipulation
cd Change directory cd Change directory cd Change directory
grep Search text for matching grep Search text for matching grep Search text for matching
pwd Print current directory lines pwd Print current directory lines pwd Print current directory lines
name name name
cut Extract columns cut Extract columns cut Extract columns
mkdir Create directory mkdir Create directory mkdir Create directory
paste Append columns paste Append columns paste Append columns
rmdir Delete directory rmdir Delete directory rmdir Delete directory
tr Translate characters tr Translate characters tr Translate characters
File Viewing sort Sort lines File Viewing sort Sort lines File Viewing sort Sort lines
cat View files uniq Locate identical lines cat View files uniq Locate identical lines cat View files uniq Locate identical lines
less Page through files tee Copy stdin to a file and less Page through files tee Copy stdin to a file and less Page through files tee Copy stdin to a file and
head View file beginning to stdout simultaneously head View file beginning to stdout simultaneously head View file beginning to stdout simultaneously
tail View file ending File Compression tail View file ending File Compression tail View file ending File Compression
nl Number lines gzip Compress files nl Number lines gzip Compress files nl Number lines gzip Compress files
od View binary data (GNU Zip) od View binary data (GNU Zip) od View binary data (GNU Zip)
xxd View binary data compress Compress files (Unix) xxd View binary data compress Compress files (Unix) xxd View binary data compress Compress files (Unix)
gv View Postscript/PDF files bzip2 Compress files (BZip2) gv View Postscript/PDF files bzip2 Compress files (BZip2) gv View Postscript/PDF files bzip2 Compress files (BZip2)
xdvi View TeX DVI files zip Compress files xdvi View TeX DVI files zip Compress files xdvi View TeX DVI files zip Compress files
(Windows Zip) (Windows Zip) (Windows Zip)
File Creation and Editing File Creation and Editing File Creation and Editing
emacs Text editor File Comparison emacs Text editor File Comparison emacs Text editor File Comparison
vim Text editor diff Compare files line by line vim Text editor diff Compare files line by line vim Text editor diff Compare files line by line
umask Set default file comm Compare sorted files umask Set default file comm Compare sorted files umask Set default file comm Compare sorted files
protections cmp Compare files byte protections cmp Compare files byte protections cmp Compare files byte
soffice Edit Word/Excel/ by byte soffice Edit Word/Excel/ by byte soffice Edit Word/Excel/ by byte
PowerPoint docs md5sum Compute checksums PowerPoint docs md5sum Compute checksums PowerPoint docs md5sum Compute checksums
abiword Edit Word documents abiword Edit Word documents abiword Edit Word documents
Disks and Filesystems Disks and Filesystems Disks and Filesystems
gnumeric Edit Excel documents gnumeric Edit Excel documents gnumeric Edit Excel documents
df Show free disk space df Show free disk space df Show free disk space
File Properties mount Make a disk accessible File Properties mount Make a disk accessible File Properties mount Make a disk accessible
stat Display file attributes fsck Check a disk for errors stat Display file attributes fsck Check a disk for errors stat Display file attributes fsck Check a disk for errors
wc Count bytes/words/lines sync Flush disk caches wc Count bytes/words/lines sync Flush disk caches wc Count bytes/words/lines sync Flush disk caches
du Measure disk usage du Measure disk usage du Measure disk usage
Backups and Remote Storage Backups and Remote Storage Backups and Remote Storage
file Identify file types file Identify file types file Identify file types
mt Control a tape drive mt Control a tape drive mt Control a tape drive
touch Change file timestamps touch Change file timestamps touch Change file timestamps
dump Back up a disk dump Back up a disk dump Back up a disk
chown Change file owner chown Change file owner chown Change file owner
restore Restore a dump restore Restore a dump restore Restore a dump
chgrp Change file group chgrp Change file group chgrp Change file group
tar Read/write tape archives tar Read/write tape archives tar Read/write tape archives
chmod Change file protections chmod Change file protections chmod Change file protections
cdrecord Burn a CD cdrecord Burn a CD cdrecord Burn a CD
chattr Change advanced file chattr Change advanced file chattr Change advanced file
attributes rsync Mirror a set of files attributes rsync Mirror a set of files attributes rsync Mirror a set of files
lsattr List advanced file lsattr List advanced file lsattr List advanced file
attributes attributes attributes

©2004 O’Reilly & Associates, Inc. O’Reilly logo is a regis- ©2004 O’Reilly & Associates, Inc. O’Reilly logo is a regis- ©2004 O’Reilly & Associates, Inc. O’Reilly logo is a regis-
tered trademark of O’Reilly & Associates, Inc. All other tered trademark of O’Reilly & Associates, Inc. All other tered trademark of O’Reilly & Associates, Inc. All other
trademarks are property of their respective owners. #30473 www.oreilly.com trademarks are property of their respective owners. #30473 www.oreilly.com trademarks are property of their respective owners. #30473 www.oreilly.com
Linux Quick Reference Linux Quick Reference Linux Quick Reference
SOME USEFUL COMMANDS SOME USEFUL COMMANDS SOME USEFUL COMMANDS

Command Task Command Task Command Task Command Task Command Task Command Task
File/Directory Basics File Location File/Directory Basics File Location File/Directory Basics File Location
ls List files find Locate files ls List files find Locate files ls List files find Locate files
cp Copy files slocate Locate files via index cp Copy files slocate Locate files via index cp Copy files slocate Locate files via index
mv Rename files which Locate commands mv Rename files which Locate commands mv Rename files which Locate commands
rm Delete files whereis Locate standard files rm Delete files whereis Locate standard files rm Delete files whereis Locate standard files
ln Link files ln Link files ln Link files
File Text Manipulation File Text Manipulation File Text Manipulation
cd Change directory cd Change directory cd Change directory
grep Search text for matching grep Search text for matching grep Search text for matching
pwd Print current directory lines pwd Print current directory lines pwd Print current directory lines
name name name
cut Extract columns cut Extract columns cut Extract columns
mkdir Create directory mkdir Create directory mkdir Create directory
paste Append columns paste Append columns paste Append columns
rmdir Delete directory rmdir Delete directory rmdir Delete directory
tr Translate characters tr Translate characters tr Translate characters
File Viewing sort Sort lines File Viewing sort Sort lines File Viewing sort Sort lines
cat View files uniq Locate identical lines cat View files uniq Locate identical lines cat View files uniq Locate identical lines
less Page through files tee Copy stdin to a file and less Page through files tee Copy stdin to a file and less Page through files tee Copy stdin to a file and
head View file beginning to stdout simultaneously head View file beginning to stdout simultaneously head View file beginning to stdout simultaneously
tail View file ending File Compression tail View file ending File Compression tail View file ending File Compression
nl Number lines gzip Compress files nl Number lines gzip Compress files nl Number lines gzip Compress files
od View binary data (GNU Zip) od View binary data (GNU Zip) od View binary data (GNU Zip)
xxd View binary data compress Compress files (Unix) xxd View binary data compress Compress files (Unix) xxd View binary data compress Compress files (Unix)
gv View Postscript/PDF files bzip2 Compress files (BZip2) gv View Postscript/PDF files bzip2 Compress files (BZip2) gv View Postscript/PDF files bzip2 Compress files (BZip2)
xdvi View TeX DVI files zip Compress files xdvi View TeX DVI files zip Compress files xdvi View TeX DVI files zip Compress files
(Windows Zip) (Windows Zip) (Windows Zip)
File Creation and Editing File Creation and Editing File Creation and Editing
emacs Text editor File Comparison emacs Text editor File Comparison emacs Text editor File Comparison
vim Text editor diff Compare files line by line vim Text editor diff Compare files line by line vim Text editor diff Compare files line by line
umask Set default file comm Compare sorted files umask Set default file comm Compare sorted files umask Set default file comm Compare sorted files
protections cmp Compare files byte protections cmp Compare files byte protections cmp Compare files byte
soffice Edit Word/Excel/ by byte soffice Edit Word/Excel/ by byte soffice Edit Word/Excel/ by byte
PowerPoint docs md5sum Compute checksums PowerPoint docs md5sum Compute checksums PowerPoint docs md5sum Compute checksums
abiword Edit Word documents abiword Edit Word documents abiword Edit Word documents
Disks and Filesystems Disks and Filesystems Disks and Filesystems
gnumeric Edit Excel documents gnumeric Edit Excel documents gnumeric Edit Excel documents
df Show free disk space df Show free disk space df Show free disk space
File Properties mount Make a disk accessible File Properties mount Make a disk accessible File Properties mount Make a disk accessible
stat Display file attributes fsck Check a disk for errors stat Display file attributes fsck Check a disk for errors stat Display file attributes fsck Check a disk for errors
wc Count bytes/words/lines sync Flush disk caches wc Count bytes/words/lines sync Flush disk caches wc Count bytes/words/lines sync Flush disk caches
du Measure disk usage du Measure disk usage du Measure disk usage
Backups and Remote Storage Backups and Remote Storage Backups and Remote Storage
file Identify file types file Identify file types file Identify file types
mt Control a tape drive mt Control a tape drive mt Control a tape drive
touch Change file timestamps touch Change file timestamps touch Change file timestamps
dump Back up a disk dump Back up a disk dump Back up a disk
chown Change file owner chown Change file owner chown Change file owner
restore Restore a dump restore Restore a dump restore Restore a dump
chgrp Change file group chgrp Change file group chgrp Change file group
tar Read/write tape archives tar Read/write tape archives tar Read/write tape archives
chmod Change file protections chmod Change file protections chmod Change file protections
cdrecord Burn a CD cdrecord Burn a CD cdrecord Burn a CD
chattr Change advanced file chattr Change advanced file chattr Change advanced file
attributes rsync Mirror a set of files attributes rsync Mirror a set of files attributes rsync Mirror a set of files
lsattr List advanced file lsattr List advanced file lsattr List advanced file
attributes attributes attributes

©2004 O’Reilly & Associates, Inc. O’Reilly logo is a regis- ©2004 O’Reilly & Associates, Inc. O’Reilly logo is a regis- ©2004 O’Reilly & Associates, Inc. O’Reilly logo is a regis-
tered trademark of O’Reilly & Associates, Inc. All other tered trademark of O’Reilly & Associates, Inc. All other tered trademark of O’Reilly & Associates, Inc. All other
trademarks are property of their respective owners. #30473 www.oreilly.com trademarks are property of their respective owners. #30473 www.oreilly.com trademarks are property of their respective owners. #30473 www.oreilly.com
Linux Quick Reference Linux Quick Reference Linux Quick Reference
SOME USEFUL COMMANDS SOME USEFUL COMMANDS SOME USEFUL COMMANDS

Command Task Command Task Command Task Command Task Command Task Command Task
Printing Networking Printing Networking Printing Networking
lpr Print files ssh Securely log into remote lpr Print files ssh Securely log into remote lpr Print files ssh Securely log into remote
lpq View print queue hosts lpq View print queue hosts lpq View print queue hosts
lprm Remove print jobs telnet Log into remote hosts lprm Remove print jobs telnet Log into remote hosts lprm Remove print jobs telnet Log into remote hosts
scp Securely copy files scp Securely copy files scp Securely copy files
Spelling Operations between hosts Spelling Operations between hosts Spelling Operations between hosts
look Look up spelling sftp Securely copy files look Look up spelling sftp Securely copy files look Look up spelling sftp Securely copy files
between hosts between hosts between hosts
aspell Check spelling aspell Check spelling aspell Check spelling
interactively ftp Copy files between hosts interactively ftp Copy files between hosts interactively ftp Copy files between hosts
spell Check spelling in batch evolution GUI email client spell Check spelling in batch evolution GUI email client spell Check spelling in batch evolution GUI email client
mutt Text-based email client mutt Text-based email client mutt Text-based email client
Processes Processes Processes
mail Minimal email client mail Minimal email client mail Minimal email client
ps List all processes ps List all processes ps List all processes
mozilla Web browser mozilla Web browser mozilla Web browser
w List users’ processes w List users’ processes w List users’ processes
lynx Text-only web browser lynx Text-only web browser lynx Text-only web browser
uptime View the system load uptime View the system load uptime View the system load
wget Retrieve web pages wget Retrieve web pages wget Retrieve web pages
top Monitor processes to disk top Monitor processes to disk top Monitor processes to disk
xload Monitor system load slrn Read Usenet news xload Monitor system load slrn Read Usenet news xload Monitor system load slrn Read Usenet news
free Display free memory gaim Instant messaging/IRC free Display free memory gaim Instant messaging/IRC free Display free memory gaim Instant messaging/IRC
kill Terminate processes talk Linux/Unix chat kill Terminate processes talk Linux/Unix chat kill Terminate processes talk Linux/Unix chat
nice Set process priorities write Send messages to nice Set process priorities write Send messages to nice Set process priorities write Send messages to
renice Change process priorities a terminal renice Change process priorities a terminal renice Change process priorities a terminal
mesg Prohibit talk/write mesg Prohibit talk/write mesg Prohibit talk/write
Scheduling Jobs Scheduling Jobs Scheduling Jobs
sleep Wait for some time Audio and Video sleep Wait for some time Audio and Video sleep Wait for some time Audio and Video
watch Run programs at set grip Play CDs and rip MP3s watch Run programs at set grip Play CDs and rip MP3s watch Run programs at set grip Play CDs and rip MP3s
intervals xmms Play audio files intervals xmms Play audio files intervals xmms Play audio files
at Schedule a job cdparanoia Rip audio at Schedule a job cdparanoia Rip audio at Schedule a job cdparanoia Rip audio
crontab Schedule repeated jobs audacity Edit audio crontab Schedule repeated jobs audacity Edit audio crontab Schedule repeated jobs audacity Edit audio
xcdroast Burn CDs xcdroast Burn CDs xcdroast Burn CDs
Hosts Hosts Hosts
uname Print system information uname Print system information uname Print system information
hostname Print the system’s hostname Print the system’s hostname Print the system’s
hostname hostname hostname
ifconfig Set/display network ifconfig Set/display network ifconfig Set/display network
information information information
host Look up DNS host Look up DNS host Look up DNS
whois Look up domain whois Look up domain whois Look up domain
registrants registrants registrants
ping Check if host is reachable ping Check if host is reachable ping Check if host is reachable
traceroute View network path to traceroute View network path to traceroute View network path to
a host a host a host

www.oreilly.com www.oreilly.com www.oreilly.com


Excerpted from Linux Pocket Reference Excerpted from Linux Pocket Reference Excerpted from Linux Pocket Reference

You might also like