Linux Commands Cheat Sheet GitHack
Linux Commands Cheat Sheet GitHack
The command line terminal in Linux is the operating system’s most powerful component. However, due to the sheer
amount of commands available, it can be intimidating for newcomers. Even longtime users may forget a command
every once in a while and that is why we have created this Linux cheat sheet commands guide.
In this page, we’ll present you with a curated list of the most handy Linux commands.
Please note that those commands are for Linux in general, both RedHat-like and Debian-like distributions. There are
some commands in the Package management session which may be specific for Redhat-based such as yum and rpm
which do not work in Ubuntu (Debian-based).
File Commands
Command Description
Searching
Command Description
grep [pattern] [file_name] Search for a specific pattern in a file with grep
grep -r [pattern] [directory_name] Recursively search for a pattern in a directory:
locate [name] Find all files and directories related to a particular name:
List names that begin with a specified character [a] in a
find [/folder/location] -name [a] specified location [/folder/location] by using the find
command:
find [/folder/location] -size
[+100M] See files larger than a specified size [+100M] in a folder:
Directory Navigation
Command Description
File Transfer
Command Description
Package management
Command Description
Process management
Command Description
Disk Usage
Command Description
SSH Login
Command Description
File Permission
Command Description
chmod 777 [file_name] Assign read, write, and execute permission to everyone
Give read, write, and execute permission to owner, and read and
chmod 755 [file_name]
execute permission to group and others
Assign full permission to owner, and read and write permission
chmod 766 [file_name]
to group and others
chown [user] [file_name] Change the ownership of a file
chown [user]:[group] [file_name] Change the owner and group ownership of a file
Network
Command Description
Variables
Command Description
Hardware information
Command Description