Hey Friends, as we know that I am a huge advocate of Linux and I think it is important aspect if you are entering Cloud Computing or DevOps. I wanted to reflect back on some commonly used linux commands while my time as a Cloud and DevOps Engineer.
Here are the top 7 commands:
ls is probably the most typed command in the terminal.
it lists the content of a directory (current directory by default)
it refers to “change directory” meaning it switches to the directory you want.
It let's you change the permission of the file.
It has a lot of options, the most I used was
𝘤𝘩𝘮𝘰𝘥 +𝘹 𝘧𝘪𝘭𝘦.𝘹 which added the execute flag.
- r (read)
- w (write)
- x (execute)
interactive process viewer that lets you manage your machine’s resources directly from the terminal. note, it's not installed by default certain times.
Stands for concatenate, lets you create, view, and concatenate files directly from the terminal. I mostly used it to preview a file without opening text editor.
it's pretty similar to cat, but only print last 10 lines by default, but it can be changed by adding -n.
You can also have a live tail of log file running, that's what I used it for the most. It can be done by adding
-f to the command -
tail -f filename
I think grep is really powerful, when working with text files. It searches for lines that match a regular expression. This really helped navigating large log files.
So these are the commands that I feel I used the most on daily basis.