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
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.
1 |
$ls -a |
Displays all files including hidden files ( files that start with a .(dot) for a file name )
1 2 3 |
$ls – R – list files and directories recursively including subdirectories $ls -I – list the inode number of each file and directory |
2. cd
The cd command changes the current directory.
Example:
1 |
cd test |
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:
1 |
$pwd |
This displays the full path of the current directory.
4. mkdir
The mkdir command creates a new directory.
Example:
1 |
$mkdir projects |
This creates a directory named projects.
Mkdir command can be used to create a tree like directory structure in a single command.
1 |
mkdir dirA dirA/dirB dirA/dirC |
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:
1 |
rm -r testdir |
This removes the directory testdir and its contents recursively
6. cp
The cp command copies files or directories.
Example:
1 |
cp file.txt backup |
This copies file.txt to the backup directory.
7. mv
The mv command moves or renames files or directories.
Example:
1 |
mv document.txt Documents |
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.
1 |
touch newfile.txt |
9. cat
The cat command concatenates and displays file content.
Example:
1 |
cat file.txt |
This displays the content of file.txt.
10. echo
The echo command displays a line of text.
Example:
1 |
echo “Welcome to Linux” |
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
About CloudThat
Established in 2012, CloudThat is an award-winning company and the first in India to offer cloud training and consulting services for individuals and enterprises worldwide. Recently, it won Google Cloud’s New Training Partner of the Year Award for 2025, becoming the first company in the world in 2025 to hold awards from all three major cloud giants: AWS, Microsoft, and Google. CloudThat notably won consecutive AWS Training Partner of the Year (APJ) awards in 2023 and 2024 and the Microsoft Training Services Partner of the Year Award in 2024, bringing its total award count to an impressive 12 awards in the last 8 years. In addition to this, 20 trainers from CloudThat are ranked among Microsoft’s Top 100 MCTs globally for 2025, demonstrating its exceptional trainer quality on the global stage.
As a Microsoft Solutions Partner, AWS Advanced Tier Training Partner, Google Cloud Platform Partner, and collaborator with leading organizations like HPE and Databricks, CloudThat has trained over 850,000 professionals across 600+ cloud certifications, empowering students and professionals worldwide to advance their skills and careers.
WRITTEN BY Vani Chakraborty
Comments