ls |
Listing the contents of a directory, including hidden files (ls -a), displaying details (ls -l), or combining both (ls -la). |
pwd |
Displaying the current working directory. |
cd <dir_name> |
Changing the current directory, navigating to root (cd /). |
mkdir <dir_name> |
Creating a new directory. |
rmdir <dir_name> |
Removing an empty directory. |
rm <file_name> |
Removing files, and recursively removing directories with all contents (rm -rf <dir_name>). |
cp <source> <destination> |
Copying files or directories to a new location. |
mv <source> <destination> |
Moving or renaming files and directories. |
touch <file_name> |
Creating an empty file or updating its timestamp. |
nano <file_name> |
Opening a file in Nano editor, editing its content, creating if not exists, saving with CTRL + S, exiting with CTRL + X. |
cat <file_name> |
Displaying the content of a file. |
echo <text> |
Displaying text or variables in the terminal. |
chmod <permissions> <file> |
Changing file permissions. |
chown <user> <file> |
Changing file ownership. |
ps |
Displaying currently running processes. |
top |
Displaying real-time system processes and resource usage. |
grep <pattern> <file> |
Searching for a pattern in files or output. |
find <path> -name <name> |
Searching for files and directories in a directory hierarchy. |
df -h |
Displaying disk space usage in human-readable format. |
du -h <file/dir> |
Displaying disk usage of files or directories in human-readable format. |
man <command> |
Displaying the manual of a command. |
sudo <command> |
Executing a command with superuser privileges (admin). |
ifconfig |
Displaying or configuring network interfaces (deprecated, use ip instead). |
apt-get install <package> |
Installing software packages in Debian-based systems. |
apt-get remove <package> |
Removing software packages. |
apt-get update |
Updating package sources to latest versions. |
apt-get upgrade |
Upgrading installed packages to the latest version. |
pip3 install <module> |
Installing a Python module. |
pip3 uninstall <module> |
Uninstalling a Python module. |
pip3 list |
Listing installed Python modules. |
pip3 list | grep <text> |
Searching for a module by name in the installed list. |
python3 |
Opening the Python3 interactive shell (use exit() to leave). |
python3 <file.py> |
Executing a Python3 script. |
shutdown |
Shutting down the system. |
reboot |
Rebooting the system. |
hostname -I |
Displaying the system IP address. |
crontab -e |
Editing scheduled tasks, managing recurring jobs. |