top of page
Writer's pictureRitika Malhotra

🌻Basic Linux Commands for DevOps Engineers on AWS EC2 Instance 🌻

Linux is one of the most popular Operating Systems. It is free and open source. Linux was first developed by Linus Torvalds when he was a student at the University of Helsinki, Finland.



Now, let’s get started with some jargon.

  1. The Root Directory represents with a forward slash (/). It is the top-level directory in Linux.

  2. /root. This is the home directory for the root user. Also known as superuser.

  3. /bin. User binaries. Contains all binary executables.

  4. /sbin. System binaries. Just like /bin, /sbin also contains binary executables. This is mostly used by system administrators.

  5. /dev. Device files. Contains hardware device files. These include and USB or devices attached to the system.

  6. /var. Variables Files. The variable data files are located in the /var directory.

  7. /mnt. Mount Directory. This directory is used to mount a file system temporarily.

  8. /usr. User Binaries. It contains applications and files used by users.

  9. /etc. Configuration files. It contains all configuration files of the server.

  10. /boot. Boot Loader Files. This directory contains all the files needed to boot the system.

  11. /home. Home Directory. It contains secondary users home directory

  12. /tmp. Temporary files. It contains temporary files created by the system and users.

Next , let’s get to some basic commands widely used by all DevOps engineers in their day-to-day activity

  1. #pwd -> It shows the present working directory

  2. #ls -> It shows available files and directory list in the present working directory

  3. #uname-> It shows the name of the kernel (OS)

  4. #cd-> It is used to change the directory

  5. #clear -> It is used to clear the screen

  6. #whoami -> It shows the current login username

  7. #history -> It shows a list of previously used commands

  8. #date-> It shows the time and date

  9. #mkdir -> To create a file or directory

  10. #touch -> To create a file

We will now log into aws.amazon.com and create an EC2 Ubuntu Instance. If you have never worked on aws prior to this, please create an account. So, rather than installing a Virtual Box, we can rent the server from AWS and once finished, terminate the instance. You are only charged for the amount of consumption. Kindly note that it is essential to terminate the instance after finishing so that you do not continue to be charged. After creating an account, go to Instances and Launch an Instance.

Select the OS as Ubuntu,


Select T2 Micro which is the free tier, and create a new key pair login. Name the key pair as Linux-key and hit on create key pair.



In the Firewall settings, enable HTTP and HTTPS traffic. It should look like this




And finally click on Launch an Instance. Your EC2 instance will be ready.


Once your instance is in running state, you can go and connect to your EC2 instance in the Browser itself.


Now, we will be looking at the black screen which is known as the Shell. The shell commands will goto Kernel.



The DevOps engineer will be working extensively with this black screen also known as the Terminal.


 

Hope you enjoyed this article and how easy it is to set up an EC2 Instance with Ubuntu Image to practice Linux Commands. If you liked this article, please give your claps. Thank you! 🙏


51 views

Recent Posts

See All
bottom of page