These commands allow navigation and interaction with the system:
ls : Lists files and folders in the current directory.ls -l displays files with details.cd : Changes the current directory.cd /home/user to navigate to /home/user.cd .. navigates to the parent directory.pwd : Displays the path of the current directory.clear : Clears the terminal screen.exit : Closes the terminal or current session.These commands help manage files and directories:
cp : Copies files or folders.cp file.txt /destination copies file.txt.mv : Moves or renames files.mv file.txt /destination moves file.txt.rm : Deletes files or folders.rm file.txt deletes file.txt.rm -r folder.mkdir : Creates a new folder.mkdir new_folder.rmdir : Deletes an empty folder.rmdir empty_folder.These commands allow monitoring and controlling system processes:
ps : Lists running processes.ps aux displays all active processes.top : Displays real-time processes.kill : Terminates a process.kill -9 PID forcefully stops the process with the specified PID.htop : Interactive alternative to top.These commands help manage network connections:
ping : Tests network connectivity to an address.ping google.com.ifconfig (or ip a) : Displays network information.netstat : Shows active network connections.traceroute : Traces the path to a network destination.traceroute google.com.These commands provide system information and control:
uname -a : Displays information about the system.df -h : Shows used and available disk space.free -h : Displays memory usage.uptime : Shows how long the system has been running.reboot : Restarts the system.shutdown : Shuts down the system.shutdown -h now shuts down immediately.These commands allow managing system users:
whoami : Displays the current user's name.adduser : Adds a new user.passwd : Changes the user's password.who : Shows logged-in users.These commands are useful for specific tasks:
sudo : Runs a command as the administrator.chmod : Changes file permissions.chmod 755 file.txt.chown : Changes file ownership.chown user:user file.txt.tar : Compresses or decompresses files.tar -czvf archive.tar.gz folder.You can combine commands with redirections:
command > file.txt : Saves the output to a file.ls > file_list.txt.command >> file.txt : Appends the output to an existing file.