Day-12 Basic Linux Commands for DevOps part-1

Photo by Sai Kiran Anagani on Unsplash

Day-12 Basic Linux Commands for DevOps part-1

Basic Linux commands

Shivlal Sharma's photo
Shivlal Sharma
ยทOct 2, 2022ยท

2 min read

Subscribe to my newsletter and never miss my upcoming articles

Yesterday, we discussed the value of Linux in DevOps and how to install Linux on a personal computer. We'll look at several Linux commands today that are helpful for DevOps. I'll merely go through the fundamental commands; not all of them.

Linux Commands ๐Ÿ‘จโ€๐Ÿ’ป

If you wish to learn these commands, you must practise them frequently.

  • echo Your_Text : To display line of text passed as a argument
    echo "Hello, Dev!"
    
  • pwd : To get current working directory
    pwd
    >> users/shivlal/Desktop
    
  • ls : to display a complete list of every folder and file currently present in the current directory. You can add flags like ls -a for more advance list which also shows hidden files.
    ls
    ls -a
    ls -all
    
  • cd directory_name : To move from one directory to another. Here few things are important to remember. If you want to go to previous directory you don't need to mention whole name just put .. after cd. If you want to go to root directory you just need to add / and if you want to move to home directory add ~.
cd Desktop
>>

pwd
>> users/shivlal/Desktop

cd ~
>>

pwd
>> /home/users/shivlal
  • mkdir directory_name : To make a new folder or a new directory
    mkdir 90DaysOfDevOps
    
  • touch file_name : To create a new file without any content.
    touch p1.txt
    
  • cat >> file_name : To create a new file with content. It is not only used for just creating file with content but also for displaying file content, merge the contents of multiple files, append one file's content to other file.
    cat >> p1.txt
    >> This is just a simple txt file.
    
  • mv file_name path : To move a file to a specific path.
    mv p1.txt  ..\Documents
    
  • ** rm file_name: To remove the file.
rm p1.txt

Resources ๐Ÿ“–

End credits ๐Ÿฟ

That was all for part-1 Linux commands, I will cover more commands in next blog.

Did you find this article valuable?

Support Shivlal Sharma by becoming a sponsor. Any amount is appreciated!

Learn more about Hashnode Sponsors
ย 
Share this