DEV Community

Cover image for Linux - System Commands
Aravinthan
Aravinthan

Posted on

Linux - System Commands

Linux - System Commands

Welcome to the first part of the Linux CLI Commands series.
In this post, we’ll cover Linux CLI commands like files, process, jobs, permission, etc..

👉 Next up: Linux - File Commands

Basic System Commands

arch -- Print machine architecture
uname -- os name information
uname-a -- all os information like os name, kernal version, hostname
cat /etc/redhat-release -- to check the linux version
hostname -- to view the current host eg:sdbt.localdomain
hostname-i -- to view network ip address
ifconfig -- also view ip address
id -- print group name and user name for the current id
logname -- print the user name
uptime -- show the system start time
date -- print date and time
date +%m%d%y -- print like month, day, year eg:12/02/24
who -- to check the number of users
who am i -- to identify which user is me
history -- print the history commands
history -c -- to clear the history
clear -- use to clear the terminal
alias -- use to restore the command into a user variable eg: alias cl=clear
unalias -- use to remove the alias eg: unalias cl
man -- man is a manual page for linux commands
cat /proc/cpuinfo -- to check number of cpu
cat /proc/meminfo -- to check memory information
exit -- to logout
init 0 -- System powers off
Equivalent to:

systemctl poweroff
shutdown -h now
halt
poweroff
Enter fullscreen mode Exit fullscreen mode

init 6 -- Reboots the system
Equivalent to:

systemctl reboot
shutdown -r now
reboot
Enter fullscreen mode Exit fullscreen mode

init 1 -- single user mode
Equivalent to:

stemctl rescue
Enter fullscreen mode Exit fullscreen mode

Top comments (0)