Linux - chapter-1: System Commands
A Beginner’s Guide to Essential Linux System Commands

Software Engineer
we need to know linux commands before diving into DevOps concepts, as a DevOps engineer, it is necessary to acquire linux commands as it is a first and foremost skill to start with,
There are different categories of Linux commands. to get started with system commands as Chapter 1, we will dive deep into system commands. I will split the Linux commands into individual articles instead of covering everything in a single article.
as the name suggests, system commands help you talk to the Linux OS and manage files, users, processes, memory, disks, and services.
sudo: the name sudo means super user and do in general
it was used to switching from one user to another user.
for example,
sudo -i : by default, ec2 is the root user in linux os, but it has limited permissions, you need permissions to modify anything, ec2 has limited permissions. to switch from ec2 to root user, u need sudo -i
clear: used to clear the terminal or you can use alternative command with CTRL + l
exit: used to exit from root user or you can do exit with other alternative by using CTRL + D
uname: used to know which os we’re currently on. for example: linux
uname -r: used to know which kernel version our os is, for example: 6.1.159-181.297.amzn2023.x86_64
uname -a: used to get full info of our os
uptime: used to know how long os has been in running state
uptime -p: used to give only the time os has been in running state
hostname: used to get private dns name of our system
hostname -i: used to get private ip address of our system
hostnamectl set-hostname “bhanu”: used to change the existing hostname of our system
who: to know about how many users have been loggedin our system
whoami: used to see the current user
history: to listout the history of command we’ve used in that system
ip addr: used to get private ip adress
ip route: used to get private ip adress
ifconfig: used to get private ip adress
date: to get today’s date
date +”%d”: to get only date
date +”%m”: to get only month
date +”%y”: to get only year
date +”%H”: to get only hour
date +”%M”: to get only minutes
date +”%S”: to get only seconds
date +”%F”: to get full date in yy/mm/dd format
date +”%A”: to get month in year
timedatectl: used to get timezones
timedatectl set-timezone Asia/Kolkata : used to change Timezone to IST
ps: used to see the running processors in system
kill -9 pid: used to remove unwanted/unused processors




