0% found this document useful (0 votes)
14 views1 page

30 Bash Commands Cheat Sheet

Uploaded by

chrisc8107
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views1 page

30 Bash Commands Cheat Sheet

Uploaded by

chrisc8107
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

30 Bash Commands Cheat Sheet

Basic File and Directory Operations Changing Permissions Control Operations

kill Command terminates processes by sending kill [options] pid…


ls Command lists all files and directories in the ls [options] [file|dir] chmod Command modifies file and directory chmod [options] [mode] [file]
current directory permissions signals to them

history Command displays a list of recently history [options]


changes the current directory to changes the ownership of files
cd Command cd [directory] chown Command chmod [options] [mode] [file] executed commands
the specified one and directories
exit Command ends a terminal session or script exit [n]

pwd Command prints the path of the current


pwd [options] connects the standard output of
working directory Archiving and Compression pipe Utility one command to the standard |
input of another
controls the input and output of >, >>, 2>, <, <<
tar Command creates, extracts, and tar [options] [archive-file] [file | dir...] Redirect Operator
File Manipulation commands
manipulates archive files

gzip Command gzip compression utility gzip [options] [file...]


cat Command print a file's contents in the cat [options] [file path]
terminal Viewing File and System Details
gunzip Command utility for decompressing gzip
“ gunzip [options] [file...]
create a new, empty file touch [file] files
touch Command
head Command shows the beginning section of a head [options] [file...]
text file or input stream
rm Command removes files or directories rm [options] [file|dir path]
shows the ending portion of a
Searching and Sorting tail Command text file or input stream tail [options] [file...]

mkdir Command creates a new, empty directory mkdir [options] [dir] displays text or variables on the
echo Command terminal echo [options] [string]
find Command searches for files or a specific find [location] [expression] [options]
rmdir Command removes only empty directories rmdir [options] [dir] string of characters
date Command prints the system date and time date [options] [+format]
searches files for lines that match grep [options] [search pattern] [file]
grep Command
cp Command copy files and directories using cp [options] [source] [destination] a regular expression
df Command displays information about disk df [options] [filesystem]
the CLI space usage
sorts the lines in text files in a sort [options] [file]
sort Command
mv Command move files and directories mv [options] [source] [destination] specific order du Command displays the disk space usage of du [options] [file]
files and directories

ps Command provides information about


currently running processes ps [options]

You might also like