Learn Crucial Linux Commands

Learn Crucial Linux Commands

We'll look at some basic Linux commands today that are essential for any DevOps novice to learn. Let's get started.

1. Viewing File Contents:

The ‘cat’ command allows you to view the contents of a file. To see what's written in a file, simply use ‘cat filename.txt

2. Changing Access Permissions:

You can modify file access permissions with the ‘chmod’ command. For instance, ‘chmod 755 filename.txt’ grants read, write, and execute permissions to the owner and read-only access to others.

3. Checking Command History:

To check the commands you've run so far, the ‘history’ command provides a list of previously executed commands.

4. Removing a Directory/Folder:

The ‘rm –r’ command is used to remove a directory and its contents. For example, to delete a folder named 'myfolder,' you'd use ‘rm -r myfolder’

5. Creating and Viewing Files:

To create a 'fruits.txt' file: ‘touch fruits.txt’

To view its content: ‘cat fruits.txt’

6. Adding Content to 'devops.txt':

To add the requested fruit list to 'devops.txt,' you can use the ‘echo’ command as follows:

‘echo -e "Apple\nMango\nBanana\nCherry\nKiwi\nOrange\nGuava" > devops.txt’

7. Showing Top and Bottom Fruits:

To display the top three fruits from 'devops.txt,' use the ‘head’ command.

To show the bottom three fruits, use the ‘tail’ command.

8. Creating and Viewing 'Colors.txt':

To create a 'Colors.txt' file: ‘touch Colors.txt’

To view its content: ‘cat Colors.txt’

9. Adding Content to 'Colors.txt':

To add the list of colors to 'Colors.txt,' you can use the ‘echo’ command just like before.

10. Finding the Difference Between Files:

Use the ‘diff’ command to identify differences between 'fruits.txt' and 'Colors.txt':

‘diff fruits.txt Colors.txt’

You're developing the abilities you'll need as you advance in the DevOps field by learning these fundamental Linux commands. You will always have Linux as a helpful and adaptable tool in your search for effective system management and automation. Keep up the fantastic effort and watch this space for more thrilling DevOps experiences!


#Linux #DevOps #cloud #AWS #community

#techenthusiast #Devops #CloudComputing


Follow for more:

Linkedin - https://www.linkedin.com/in/samarjeet-patil-921952251/