The Linux operating system is used on most servers today. For anyone who wants to work in DevOps, system administration, cybersecurity, and cloud technologies, knowing Linux is no longer an option, but a necessity.
The first environment that those who start learning Linux encounter is the terminal. Although it has a graphical interface, working with the command line is faster and more efficient in a real work environment.
In this article, we will explain the most commonly used simple commands in Linux with real examples.
What is the terminal and why is it important?
The terminal is the environment where you communicate directly with the system. Each command you write here gives the operating system a specific task.
For example:
- Create a file
- Change a folder
- Delete a file
- Monitor processes on the server
The first thing we tell students who start learning Linux is:
Don't be afraid of the terminal. It is your most powerful tool.
1. pwd – Where am I right now?
The first thing you need to know when working in Linux: what directory are you in right now?
The `pwd` command shows this.
pwd
For example, the result may be:
/home/elshan
This means that you are in the user's home directory.
When working in a server environment, performing an operation in the wrong directory can cause serious problems. That's why pwd seems small, but it is very important.
2. ls – What is in the directory?
It is used to see the files and directories in the current directory.
ls
But in real life, we usually use it like this:
`ls -l`
This option gives you additional information:
- File size
- Permissions
- Owner
- Date
If you also want to see hidden files:
`ls -la`
In Linux, files that start with a dot (.) are considered hidden. For example, .bashrc.
3. cd – Change directory
Everything in Linux is built on the directory structure. That is why the cd command is one of the most used commands.
For example:
`cd Documents`
To go back one level:
cd ..
To go directly to the home directory:
cd ~
When working on the server, you will often need to navigate to directories such as /etc, /var, /opt. Therefore, the cd command should become a reflex.
4. mkdir – Create a new directory
It is very simple to open a directory for a new project:
`mkdir project`
It is also possible to create several directories at the same time:
`mkdir backend frontend database`
In a real DevOps environment, this command is often used to properly set up the project structure.
5. touch – Create a file
To create an empty file:
`touch app.py`
This command creates an empty file called app.py.
touch is actually intended to change the time information of a file, but in practice it is most often used to create files.
6. cp – Copy
To copy a file:
`cp file.txt backup.txt`
To copy a folder, use -r (recursive):
`cp -r project project_backup`
It is very important to make a backup copy before changing the configuration files on the server. In this case, cp is a life-saving command.
7. mv – Move or rename
mv is used for two purposes:
1️⃣ Move a file
2️⃣ Rename a file
Rename:
`mv file.txt newfile.txt`
Move to another folder:
`mv file.txt /home/elshan/Desktop/`
In Linux, there is no need to use a separate “rename” command – mv is enough.
8. rm – Delete
To delete a file:
`rm file.txt`
To delete a folder:
`rm -r folder`
⚠ Important point:
Linux does not have a “trash can”. Deleted → gone.
In a server environment, a wrong rm -rf command can cause serious complications. Therefore, you need to be careful with this command.
Who is it important to learn Linux commands for?
Linux commands are especially important for:
- DevOps engineers
- System administrators
- Cloud specialists
- Cybersecurity workers
- RHCSA and other certification candidates
If you want to work with real servers, these commands will be your everyday tools.
Conclusion:
Simple commands in Linux may seem small. But all large systems are built on these fundamental concepts.
A person who can work comfortably with the terminal:
- Solves problems faster
- Makes fewer mistakes on the server
- Can move to automation faster
The first step for anyone who wants to learn Linux is to put these commands into practice.
The first environment that those who start learning Linux encounter is the terminal. Although it has a graphical interface, working with the command line is faster and more efficient in a real work environment.
In this article, we will explain the most commonly used simple commands in Linux with real examples.
What is the terminal and why is it important?
The terminal is the environment where you communicate directly with the system. Each command you write here gives the operating system a specific task.
For example:
- Create a file
- Change a folder
- Delete a file
- Monitor processes on the server
The first thing we tell students who start learning Linux is:
Don't be afraid of the terminal. It is your most powerful tool.
1. pwd – Where am I right now?
The first thing you need to know when working in Linux: what directory are you in right now?
The `pwd` command shows this.
pwd
For example, the result may be:
/home/elshan
This means that you are in the user's home directory.
When working in a server environment, performing an operation in the wrong directory can cause serious problems. That's why pwd seems small, but it is very important.
2. ls – What is in the directory?
It is used to see the files and directories in the current directory.
ls
But in real life, we usually use it like this:
`ls -l`
This option gives you additional information:
- File size
- Permissions
- Owner
- Date
If you also want to see hidden files:
`ls -la`
In Linux, files that start with a dot (.) are considered hidden. For example, .bashrc.
3. cd – Change directory
Everything in Linux is built on the directory structure. That is why the cd command is one of the most used commands.
For example:
`cd Documents`
To go back one level:
cd ..
To go directly to the home directory:
cd ~
When working on the server, you will often need to navigate to directories such as /etc, /var, /opt. Therefore, the cd command should become a reflex.
4. mkdir – Create a new directory
It is very simple to open a directory for a new project:
`mkdir project`
It is also possible to create several directories at the same time:
`mkdir backend frontend database`
In a real DevOps environment, this command is often used to properly set up the project structure.
5. touch – Create a file
To create an empty file:
`touch app.py`
This command creates an empty file called app.py.
touch is actually intended to change the time information of a file, but in practice it is most often used to create files.
6. cp – Copy
To copy a file:
`cp file.txt backup.txt`
To copy a folder, use -r (recursive):
`cp -r project project_backup`
It is very important to make a backup copy before changing the configuration files on the server. In this case, cp is a life-saving command.
7. mv – Move or rename
mv is used for two purposes:
1️⃣ Move a file
2️⃣ Rename a file
Rename:
`mv file.txt newfile.txt`
Move to another folder:
`mv file.txt /home/elshan/Desktop/`
In Linux, there is no need to use a separate “rename” command – mv is enough.
8. rm – Delete
To delete a file:
`rm file.txt`
To delete a folder:
`rm -r folder`
⚠ Important point:
Linux does not have a “trash can”. Deleted → gone.
In a server environment, a wrong rm -rf command can cause serious complications. Therefore, you need to be careful with this command.
Who is it important to learn Linux commands for?
Linux commands are especially important for:
- DevOps engineers
- System administrators
- Cloud specialists
- Cybersecurity workers
- RHCSA and other certification candidates
If you want to work with real servers, these commands will be your everyday tools.
Conclusion:
Simple commands in Linux may seem small. But all large systems are built on these fundamental concepts.
A person who can work comfortably with the terminal:
- Solves problems faster
- Makes fewer mistakes on the server
- Can move to automation faster
The first step for anyone who wants to learn Linux is to put these commands into practice.
