Professional Documents
Culture Documents
ls – directory listing tar cf [file_name.tar files] – create a tar whereis [application_name] – show possible
ls -al – formatted listing with hidden files named file_name.tar containing files locations of binary, source, and manual
tar xf [file_name.tar] – extract the files from page files for a command
cd [directory] - change directory to directory
file_name.tar which [application_name] – show which
pwd – Print Working Directory
tar czf [file_name.tar.gz files] – create a tar application will be run by default
mkdir [directory] – create a directory named
file with Gzip compression
directory
Searching
tar xzf [file_name.tar.gz] – extract a tar
rm [file_name] – delete filename
using Gzip grep [pattern files] – search for pattern in
rm -r [directory] – delete directory recurs‐ files
tar xjf [file_name.tar.bz2] – extract a tar
ively
using Bzip2 grep -r [pattern directory] – search recurs‐
rm -f [file_name] – force remove file ively for pattern in directory
gzip [file_name] – compresses file and
rm -rf [directory] – force remove directory [command] | grep [pattern] – search for
renames it to file_name.gz
directory recursively * Use with care pattern in the output of command
gzip -d [file_name.gz] – decompresses
cp [file1 file2] – copy file1 to file2 locate [file_name] – find all instances of file
file_name.gz back to file
mv [file1 file2] – rename or move file1 to
file2 System Information Process Management
ln -s [file_name link] – create symbolic link date – show the current date and time ps – (Process Status) displays your
to file currently active processes
cal – show this month's calendar
touch [file_name] – create or update file top – (Table of Processes) display all
uptime – show current uptime
cat > [file_name] – places standard input running processes
w – display who is online
into file kill [pid] – kill process id pid
whoami – who you are logged in as
more [file_name] – output the contents of killall [process_name] – kill all processes
finger user – display information about user
file named [process_name]
uname -a – show kernel information
head [file_name] – output the first 10 lines bg – lists stopped or background jobs;
of file cat /proc/cpuinfo – cpu information resume background job
tail [file_name] – output the last 10 lines of cat /proc/meminfo – memory information fg – brings the most recent job to
file man command – show the manual for foreground
tail -f [file_name] – output the contents of command fg [n] – brings job id to the foreground
file as it grows, starting with the last 10 lines df – show disk usage
chmod [octal file_name] change the permis‐ du – show directory space usage
sions of file to octal
free – show memory and swap usage
cheatography.com/nexwebsites/
nexwebsites.com
Basic Linux Commands Cheat Sheet
by NexWebSites.com (NexWebSites) via cheatography.com/57483/cs/21297/
Network
Shortcuts
cheatography.com/nexwebsites/
nexwebsites.com