Mastering Essential System-Level Commands: A Crisp Guide for Every Linux User
Let’s explore 14 key commands, using symbols and simple diagrams to explain their purpose. Here’s a concise guide to some of the most important system-level commands.
1. uname
2. uptime
3. Date
4. who,whoami
5. which
6. id
7. Sudo
8. shutdown
9. reboot
10. apt
11. yum
12. dnf
13. pacman
14. portage
1. uname – Display System Information
The uname command outputs important details about your system, like the kernel version, system architecture, and OS type.
uname -a
2. uptime – Show System Uptime and Load
Use uptime to find out how long your system has been running and its load averages.
uptime
3. date – Display or Set Date and Time
Displays the current system date and time. You can also format or set the date and time.
date
4. who and whoami – Check Logged-in Users
5. which – Find Command Location
which shows the path to the executable for a given command.
which python
6. id – Display User and Group IDs
The id command displays the user ID (UID) and group ID (GID) of the current user.
7. sudo – Execute as Superuser
sudo allows permitted users to execute commands as the superuser, often required for system administration.
sudo apt update
8. shutdown – Power Off the System
Shuts down the system after a specified time or immediately.
sudo shutdown now
9. reboot – Restart the System
It's useful after making system-level changes that require a restart.
sudo reboot
10. apt – Package Management for Debian-based Systems
apt is the package manager for systems like Ubuntu and Debian. It handles installing, updating, and removing software.
sudo apt update
sudo apt install nginx
11. yum – Package Manager for RPM-based Systems
yum is the package manager for Red Hat-based distributions, like CentOS. It’s used for managing RPM packages.
sudo yum update
sudo yum install nginx
12. dnf – Modern RPM-based Package Manager
The successor to yum on newer RPM-based systems (like Fedora). It offers improved performance and better dependency management.
sudo dnf update
sudo dnf install nginx
13. pacman – Package Manager for Arch Linux
pacman is used in Arch-based distributions (like Manjaro), pacman is a fast, lightweight package manager with robust dependency management. It is known for its speed and simplicity.
sudo pacman -Syu
sudo pacman -S nginx
14. portage – Source-based Package Management (Gentoo)
portage is the package manager for Gentoo, known for compiling software from source code.
emerge --sync
emerge nginx
Conclusion:
Understanding these commands will equip us to better manage Linux systems, troubleshoot issues, and perform essential administrative tasks. Master them, and we’ll have a solid foundation to tackle system-level challenges with confidence!
Happy coding everyone..!
Senior Associate | Developer | AWS CCP Certified | Devops | Git | Jenkins | Docker | Kubernetes | Ansible | Terraform | Python
6moGreat Work Shina Gupta