DevOps — Basic Linux Commands Part 1

Basic Linux commands for DevOps troubleshooting

Tony
4 min readAug 26, 2022

--

Linux fundamentals and commands is one of the most essential skills of a DevOps Professional. Most of the companies have their environment on Linux, as a DevOps engineer, you need to get familiar with Linux in order to troubleshoot production issues.

In this article, I will introduce some basic Linux commands for DevOps operations.

ls

ls : list information about files in a directory (Default it will use the current directory).

Common parameters and usage:

$ ls ==> list the filenames of the current directory
$ ls -l ==> list file details
$ ls -a ==> list file names (including hidden files)
$ ls -la ==> List file details (including hidden files)
$ ls /etc ==> List the file names of the specified directory /etc
$ ls -laS ==> List files and sort them by size in descending order
$ ls -laShR ==> List subdirectories recursively
$ ls -lt ==> List files by last modification date

alias

alias: Make an alias for a command

Common usage:

$ alias l='ls -l' ==> Give ls -l an alias l
$ alias k='kubectl' ==> Give kubectl an alias k
$ alias -p ==> Displays a list of all currently set…

--

--