Skip to main content

Command Palette

Search for a command to run...

Linux - chapter-1: System Commands

A Beginner’s Guide to Essential Linux System Commands

Updated
3 min read
Linux - chapter-1: System Commands
B

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.

  1. 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

  2. clear: used to clear the terminal or you can use alternative command with CTRL + l

  3. exit: used to exit from root user or you can do exit with other alternative by using CTRL + D

  4. uname: used to know which os we’re currently on. for example: linux

  5. uname -r: used to know which kernel version our os is, for example: 6.1.159-181.297.amzn2023.x86_64

  6. uname -a: used to get full info of our os

  7. uptime: used to know how long os has been in running state

  8. uptime -p: used to give only the time os has been in running state

  9. hostname: used to get private dns name of our system

  10. hostname -i: used to get private ip address of our system

  11. hostnamectl set-hostname “bhanu”: used to change the existing hostname of our system

  12. who: to know about how many users have been loggedin our system

  13. whoami: used to see the current user

  14. history: to listout the history of command we’ve used in that system

  15. ip addr: used to get private ip adress

  16. ip route: used to get private ip adress

  17. ifconfig: used to get private ip adress

  18. date: to get today’s date

  19. date +”%d”: to get only date

  20. date +”%m”: to get only month

  21. date +”%y”: to get only year

  22. date +”%H”: to get only hour

  23. date +”%M”: to get only minutes

  24. date +”%S”: to get only seconds

  25. date +”%F”: to get full date in yy/mm/dd format

  26. date +”%A”: to get month in year

  27. timedatectl: used to get timezones

  28. timedatectl set-timezone Asia/Kolkata : used to change Timezone to IST

  29. ps: used to see the running processors in system

  30. kill -9 pid: used to remove unwanted/unused processors

Linux Commands every DevOps engineer should know

Part 7 of 7

This series breaks down Linux commands into clear categories such as system, hardware, and file commands. Each topic is covered in a separate article to make learning Linux simple, organized, and beginner-friendly.

Start from the beginning

Linux in one liners

Linux basic terminology: all you need to get started