Linux

2 Mins Read

10 useful Linux Commands with Examples

Voiced by Amazon Polly

Linux commands are powerful tools that can help you manage your system efficiently. Whether you’re a beginner or an experienced user, these commands are essential for navigating and controlling your Linux environment. Here are the top 10 Linux commands with examples:

Customized Cloud Solutions to Drive your Business Success

  • Cloud Migration
  • Devops
  • AIML & IoT
Know More

1. ls

The ls command lists the contents of a directory.

There are lots of options that are available with this command that can generate the output in a way we want it. Some of the important options are :

$ls -l

This command gives a long listing of the file and directory names including the type of file, size, number of links etc.  This lists files in long format, showing permissions, owner, size, and modification date.

Displays all files including hidden files ( files that start with a .(dot)  for a file name )

2. cd

The cd command changes the current directory.

Example:

This changes the current directory to test

$cd – with no argument takes you to the home directory

$cd.. – takes you to the parent directory

$cd ../.. – takes you to the parent directory of the parent directory

3. pwd

The pwd command prints the current working directory.

Example:

This displays the full path of the current directory.

4. mkdir

The mkdir command creates a new directory.

Example:

This creates a directory named projects.

Mkdir command can be used to create a tree like directory structure in a single command.

In the above command a directory called dirA gets created and under it, directories dirB and dirC get created in a single command

5. rm

The rm command removes files or directories.

Example:

This removes the directory testdir and its contents recursively

6. cp

The cp command copies files or directories.

Example:

This copies file.txt to the backup directory.

7. mv

The mv command moves or renames files or directories.

Example:

This moves document.txt to the Documents directory.

8. touch

The touch command creates an empty file or updates the timestamp of an existing file.

Example:

This creates an empty file named newfile.txt.

9. cat

The cat command concatenates and displays file content.

Example:

This displays the content of file.txt.

10. echo

The echo command displays a line of text.

Example:

This prints “Welcome to Linux” to the terminal.

These are some of the useful linux commands. It gives greater power and efficiency to work with and get better results.

Get your new hires billable within 1-60 days. Experience our Capability Development Framework today.

  • Cloud Training
  • Customized Training
  • Experiential Learning
Read More

About CloudThat

CloudThat is a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.

CloudThat is the first Indian Company to win the prestigious Microsoft Partner 2024 Award and is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 850k+ professionals in 600+ cloud certifications and completed 500+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, Microsoft Gold Partner, AWS Training PartnerAWS Migration PartnerAWS Data and Analytics PartnerAWS DevOps Competency PartnerAWS GenAI Competency PartnerAmazon QuickSight Service Delivery PartnerAmazon EKS Service Delivery Partner AWS Microsoft Workload PartnersAmazon EC2 Service Delivery PartnerAmazon ECS Service Delivery PartnerAWS Glue Service Delivery PartnerAmazon Redshift Service Delivery PartnerAWS Control Tower Service Delivery PartnerAWS WAF Service Delivery PartnerAmazon CloudFront Service Delivery PartnerAmazon OpenSearch Service Delivery PartnerAWS DMS Service Delivery PartnerAWS Systems Manager Service Delivery PartnerAmazon RDS Service Delivery PartnerAWS CloudFormation Service Delivery PartnerAWS ConfigAmazon EMR and many more.

WRITTEN BY Vani Chakraborty

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!