linux is good

27+ Linux CLI commands for cloud architects & engineers.

Linux is one of the most widely used open-source OS because of its safety, security features, and ease of use. in the cloud you will find it in IoT, big data, DevOps, networking, data management, compute, and much more.

Major cloud providers like AWS, GCP, AZURE, Oracle & IBM cloud have virtual machines running a variation of the Linux operating system like Ubuntu, Redhat,open SUSE,SUSE Linux, CentOS, Fedora, etc.. you will need to understand the Linux CLI commands to SSH Into such virtual machines or even use the command line.

for a beginner working with Linux can seem like an arduous task and you might think it’s only meant for people with programming knowledge, which isn’t true.

in my case when I got into the cloud computing space I used to avoid using the CLI as much as possible but with practice, I got better at it and I now prefer using the CLI to the console. interacting with IAAS like Terraform or Ansible without knowing basic CLI commands is impossible so it’s better to get used to it in the first place if you desire to build a career on the cloud.

Linux CLI commands for AWS, Azure, GCP, Oracle, and IBM cloud.

all the major cloud providers have a cloud shell CLI to enable developers to build or destroy from the command line. you should note, to begin with, that the CLI is case sensitive ls and LS and 2 different commands so use lowercase letters unless stated otherwise.

the below commands are for bash which is native to Linux and not PowerShell.if you are interacting with PowerShell like on azure cloud shell make sure to use their commands as they are not all the same as bash commands.

ls -argurment used to list the contents of a directory.
  • ls-l command gives a detailed list such as file type, permissions, and timestamp.
  • ls -lt command sorts the files by timestamp.
  • ls -l -t command sorts the file by size.
pwd- print working directory used to discover where you currently are in the file system.
cd-change directory can be used to change from the current directory to another.
su- allows you to create a new cloud shell environment temporarily and act as a diffrent user. to exit use the exit command to return the the admin account.
sudo-allows a user to execute a command as another user without creating a new shell.sudo gives a user administrative privileges.

sudo stands for superuser do.

chmod-used to change the permissions of a file or directory.only the root user or file owner can be able to change permissions.
chown-used to change the ownership of a file and directory.
cp- used to copy files,you however need to have access/read permissions to execute. 
cat-used to quickly view the entire contents of a file.
mv-similar to the copy command it is used to move files from one location in the file system to another.it also requires both a source and destination file path and necessary execution permissions.
aws cloud shell
rm-command used to permanently delete files and directories.
gprep-command used to search,filter and interpret text patterns presenting a matched result.
shutdown-used to shutdown the terminal in a safe way by the root account.the command needs a time argurment specifying when the shutdown should begin.
ps-lists processes running on the cloud shell terminal by default
  • ps-e will display every process running in the system
sudo apt-get update-adminstrative command to install package files from repositories.
apt-get update-shows current list of available packages ready for download.

APT (advanced packaging tool) is a command used to install new software packaging and upgrade existing ones.

azure bash CLI
apt-get install- command to install/update a package by name
apt-get update-get package list from package repository and update the local package database
apt-get upgrade-update all currently installed packages to their latest versions.
apt-get remove-command to delete all the files of a package except the configuration files.
apt-get purge-command to delete all packages files from the system together with the configuration files.
passwd-used to update a user's password.users can only change their passwords but admins can change any password.
echo-command prints the output to the terminal if used to add a comment or note to a file.echo can also replace original content in a text through redirection. 
aws cloud shell echo
CTRL +C breaks a contionus running process on the cloud shell.
mkdir -make directory command.
ssh -keygen command to create a key pair for your VM.
cat ..ssh/id_rsa.pub command to view your public key and use it with a VM.

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top