Common Linux Commands Every Hacker Should Know

cat – Use the cat command to display the contents of a file
chmod – Use chmod to make a file executable and to change the permissions granted to it in Linux
cut – The cut command in Linux is a command for cutting out the sections from each line of files and writing the result to standard output
diff – diff is a command-line utility that allows you to compare two files line by line
env – env is used to either print environment variables
expand – The expand command is used to convert tabs in files to spaces
find – Use the find command to track down files that you know exist if you can’t remember where you put them
fmt – fmt command in LINUX actually works as a formatter for simplifying and optimizing text files
grep – The grep utility searches for lines which contain a search pattern
head – The head command gives you a listing of the first 10 lines of a file
help – To know more about a command and how to use it, use the help command
history – The history command lists the commands you have previously issued on the command line
info – info reads documentation in the info format
join – The join command in Linux is a command line utility for joining lines of two files on a common field
less – The less command allows you to view files without opening an editor
man – To know more about a command and how to use it, use the man command
more – more command is used to view the text files in the command prompt, displaying one screen at a time in case the file is large
nl – nl command is a Linux utility that is used for numbering lines, accepting input either from a file or from STDIN
od – od command in Linux is used to convert the content of input in different formats with octal format as the default format
paste – paste is a command that allows you to merge lines of files horizontally
pr – The pr command writes the specified file or files to standard output
pwd – When you first open the terminal, you are in the home directory of your user. To know which directory you are in, you can use the “pwd” command
sed – SED command in UNIX is stands for stream editor and it can perform lot’s of function on file like, searching, find and replace, insertion or deletion
set – Linux set command is used to set and unset certain flags or settings within the shell environment
sort – SORT command sorts the contents of a text file, line by line
split – Split command in Linux is used to split large files into smaller files
su – The su command is used to switch to another user
sudo – If you want any command to be done with administrative or root privileges, you can use the sudo command
tail – The tail command gives you a listing of the last 10 lines of a file
time – The time command is used to determine how long a given command takes to run
tr – The tr command in UNIX is a command line utility for translating or deleting characters
type – The Type command is used to find out the information about a Linux command
uname – You can obtain some system information regarding the Linux computer you’re working on with the uname command.
unexpand – The unexpand command lets you convert spaces into tabs
uniq – The uniq command in Linux is a command line utility that reports or filters out the repeated lines in a file
wc – The wc command in UNIX is a command line utility for printing newline, word and byte counts for files
xargs – The xargs command in UNIX is a command line utility for building an execution pipeline from standard input
cd – Use the “cd” command to go to a directory
mkdir – Use the mkdir command when you need to create a folder or a directory
rm – Use the rm command to delete files and directories