A Linux commands cheat sheet is a concise and quick reference guide that provides a list of commonly used commands in the Linux command-line interface (CLI). It typically includes commands for navigating the file system, managing files and directories, viewing and editing files, obtaining system information, managing processes, handling users and permissions, and more.
The cheat sheet is a handy resource for both beginners and experienced Linux users who want a quick reminder of command syntax and options. It usually organises commands by categories and includes brief descriptions of their functionalities.
Navigation and File Management:
ls– List files and directories.
pwd– Print the current working directory.
cd– Change directory.
cp– Copy files or directories.
- cp source destination
mv– Move or rename files or directories.
mv source destination
rm– Remove files or directories.
rm -r directory_name(recursive)
mkdir– Create a new directory.
touch– Create an empty file or update the access and modification times of a file.
File Viewing and Editing:
cat– Concatenate and display the content of files.
less– View the contents of a file one screen at a time.
vim– Text editors for creating or modifying files.
uname– Display system information.
df– Display disk space usage.
free– Display amount of free and used memory in the system.
top– Display and update information about the top processes.
ps– Display information about processes.
kill– Terminate a process.
pkill– Send a signal to a process based on its name.
Users and Permissions:
whoami– Display the current username.
who– Display information about users who are currently logged in.
chmod– Change file permissions.
chmod permissions file_name
chown– Change file owner and group.
chown owner:group file_name
apt– Advanced Package Tool for managing packages.
sudo apt update
sudo apt install package_name
This is just a basic list, and there are many more Linux commands and options available. You can use the
man command followed by the command name to access the manual pages and get more information about a specific command. For example,
man ls will provide details about the