If you have used Windows or a Mac in your life the Linux Terminal is really different. At Coding Journey we think the Terminal is like the engine room of a ship. Most people like to stay on the deck and look at the view, which is the Desktop.
The Linux Terminal is like the engine room where the engineers work because that is where you can do really powerful things with the Linux Terminal. The Linux Terminal is what makes things work.
Basic linux commands are what you use to tell the computer what to do.
In this article, We will start with things like moving files around. Then we will learn how to manage systems. By the time we are done you will feel comfortable using Linux.
🗺️ Mastery Roadmap
- → Navigation: The GPS Skills
- → File & Folder Alchemy
- → Reading & Searching Data
- → Security & The “Sudo” Power
- → System Health & Monitoring
- → The Global Connection
- → Expert Keyboard Shortcuts
- → 20 Critical FAQs: Basic Linux Commands
🧭 1. Navigation: This Is How You Find Your Way Around
When using a computer with a graphical interface you use a mouse to navigate, however mastering basic linux commands allows you to use your keyboard to jump between locations and manage the entire filesystem with precision.
The GPS Command: pwd
When you are using the terminal you do not have a folder icon to show you where you are. The command pwd means Print Working Directory.
You can think of the command pwd as a sign that says “You Are Here” on a map of a mall. The command pwd will give you a path like /home/user/documents.
If you ever feel lost in the terminal you should type the command pwd first to find out where you are.
Read more
$ pwd /home/user/documents
The Look Around Command: ls
The command ls is what you use to see what is inside a folder. The power of these basic linux commands lies in “flags” or “filters”—secret modifiers that change how the information is displayed.
By mastering these options within your basic linux commands toolkit you can reveal hidden files sort by file size or see detailed permissions that are usually invisible in a standard folder view.
To understand file listing clearly, read our complete guide on ls command in linux with real Kali Linux examples.
The Teleport Command: cd
cd (Change Directory) is your primary mode of transport.
⚡ Quick Jumps:
cd / — When you type cd / you are using one of the most fundamental basic linux commands to teleport to the “Root”—which is the absolute ground floor of your computer’s building. Everything else on the system lives in a room above this floor.
cd ~ — Takes you “Home”—your personal user folder.
cd .. — When you type cd .. it moves you up one level.
🔥 Want to master Linux navigation like a pro?
-
Read in detail-
cd command in linux
🛠️ 2. Changing Files And Folders: How To Make And Delete Them
In Linux people say that everything is a file. This means that learning to manage files is a lot like learning to organize a library on your computer.
You have to know how to take care of your Linux files to keep everything running smoothly.
The Constructor Commands: mkdir and touch
The command mkdir is used to create folders. If you want to create a path at once for example /Project/2026/Logs you should use the command mkdir -p.
The option -p tells Linux to create the parent folders if they do not exist yet. The command touch creates a file.
If you want to study in detail about the
mkdir command in linux
, visit this page.
This is the way to start a new document without having to open an editor. You can use touch to create a file quickly.
$ mkdir -p Project/2026/Logs $ touch newfile.txt
The touch command in Linux is one of the most essential file management commands, used to create empty files and update file timestamps efficiently from the terminal. Understanding how the touch command in Linux works helps beginners and professionals manage files faster, automate tasks, and follow best practices in real-world Linux environments.
At Coding Journey, we have published a detailed and beginner-friendly guide that explains the touch command in Linux with clear examples, practical use cases, and common mistakes to avoid. This guide is ideal for students, developers, and cybersecurity learners who want to strengthen their Linux fundamentals.
Read the complete guide here:
Touch Command in Linux
The Mover and Doubler: mv and cp
mv (Move) does two jobs. It moves a file to a new folder or it renames a file if you keep it in the same folder. cp (Copy) duplicates the file.
⚠️ Important:
If you want to copy a folder you have to use cp -r because this command copies things recursively.
If you do not use cp -r Linux will get confused. It will not copy the folder. The folder is like a container that holds lots of things so you need to use cp -r to copy the folder and everything inside it.
Linux mv Command
how to use cp command in linux
The Eraser: rm and rmdir
rm deletes files. ⚠️ Warning: There is no Trash Can in the terminal. When you delete something here it is gone.
🛡️ Safety Options:
rm -i — When you use rm -i it is like a safety net. The computer will ask you if you are sure before it deletes something.
Learn how the
rm command in linux works and how to use it safely to delete files and directories in details.
Learn how the rmdir command in linux works and how to use it safely to delete empty directories in details.
🔬 3. Reading & Searching Data: The Digital Microscope
Once you have files you need a way to look inside them and find exactly what you need without wasting time. By using basic linux commands you can peek at the data inside a file or search for a specific word in seconds.
Think of these basic linux commands like a digital magnifying glass; they allow you to scan through thousands of lines of text to find a single piece of information without ever needing to open a heavy text editor.
The “Quick View” Trio: cat, head, and tail
cat is great for reading small files. But if a file has 10,000 lines cat will blast them all onto your screen at once.
To master your workflow, it is essential to understand what does cat command do in linux and how it helps you view, create, and combine files directly from the terminal.
To master your workflow, it is essential to understand head command in linux and how it helps you quickly preview the beginning of files, logs, and scripts from the terminal.
To master your workflow, it is essential to understand tail command in linux and how it helps you quickly preview the end of files, logs, and scripts from the terminal.
📄 Smart Preview Commands:
head -n 5 — Shows you only the first 5 lines.
tail -n 5 — Shows you only the last 5 lines.
tail -f — The tail -f command is like a stream. Professionals use the tail -f command to watch log files update in time as things happen.
This is really useful for the tail -f command because it shows what is going on with the log files now.
The Search Engine: grep
grep is arguably the most powerful tool in your kit. It searches for specific words inside files.
$ grep "password" secret.txt
Example: grep "password" secret.txt will look through the secret.txt file. Show you every line where the word “password” is found.
This is how hackers and administrators find the things they are looking for in files. The grep command is very useful for finding things like the word “password” in the secret.txt file.
The Pager: less
When a file is really long the less tool is very helpful. It lets you read the file like you are reading a book on your computer. You can move up and down the file.
You can even search for specific words by using the / symbol. The best part is that the less tool does not make your computer slow down. This is because it only shows you the part of the file that you are looking at not the thing at once.
To read long files page by page, learn how the more command in Linux helps manage large terminal output easily.
The less command in Linux is perfect for beginners who want controlled and readable file viewing in the terminal.
🔐 4. Security & Permissions: Who is the Boss?
Since Linux is built for many people to share it uses strict rules called “permissions” to keep your files safe from others. Mastering these basic linux commands is like learning who has the keys to which rooms in a building.
By understanding how permissions work with basic linux commands you decide exactly who is allowed to read write or run your files. This is the “security guard” phase of your Coding Journey ensuring your data stays private and protected.
The Sudo Shield
When you are using a computer most of the system files are locked. This is so that people who are using the computer cannot mess things up.
The computer has a tool called sudo that is like a master key. When you use sudo you are telling the computer that you’re in charge. You are saying “let me do this” to the computer.
The computer will then ask you for your password when you use sudo to make sure it is really you.
$ sudo apt update [sudo] password for user:
The Ownership Commands: chown and chmod
Files have owners and permissions.
For more control over system-level tasks, pair chown with the powerful sudo in Linux command to run administrative operations safely.
🔑 Control Access:
chown — The chown command is used to change who owns a file. This means it lets you decide which user is in charge of the file. The chown command is very useful when you need to change the owner of a file.
chmod — Changes what people can do with the file.
💡 Pro Tip:
When we talk about permissions we are usually talking about three numbers like 777 or 644.
The number 7 is special because it means you can do everything with the file. You can read it you can write in it. You can run it.
The number 4 means you can only read the file that is all. At Coding Journey we think it is an idea to use chmod 600 for files that have sensitive information.
What this means is that only I can see the file and everyone else is blocked from seeing it. This is like saying “Only I can see this everyone else is blocked.”
click here to read in details about chown command in linux
click here to read in details about chmod command in linux
💻 5. System Health: Checking the Computers Pulse
If your Linux system feels slow it means something is hogging the “brain power” of your computer. Using basic linux commands for system monitoring allows you to quickly find and stop these “resource hogs” that are slowing you down.
By typing in a few basic linux commands you can see exactly which programs are using up your memory and storage. Think of this as a health check for your computer; it helps you keep everything running smoothly on your Coding Journey.
The Task Manager: top and htop
The top command gives you a list of every program that is running. This list gets updated all the time.
The top command shows you how much memory and processor power each program is using. If a program is not working properly you can find its PID (Process ID). Then use the kill command to stop the program.
The kill command is useful when a program is frozen. You want to stop it.
Read the complete guide on htop in linux
$ top $ htop # More colorful version
The Storage Check: df and du
When you use the command df -h it will show you how full your hard drive is. The command du -sh is also very useful because it shows you how space a specific folder is taking up.
Hard drive space is something that administrators always check when a server starts acting. Administrators do this because the hard drive is a cause of server problems. So administrators will use the df -h command to check the drive and the du -sh command to check the folders on the hard drive.
$ df -h # Check disk space $ du -sh folder/ # Check folder size
The Who am I?: whoami and id
If you are logged into a server and you forget which account you are using the whoami command tells you your username.
The id command gives you detail about the account you are using like which security groups the account belongs to. This is really helpful when you need to know more about the account you are using on the server so the whoami and id commands are very useful.
🌐 6. The Global Connection: Linux on the Net
Since most of the world’s websites run on Linux it is essentially the language of the internet. By using basic linux commands you can talk directly to servers and computers across the globe.
Think of these basic linux commands as a digital telephone; they allow you to check your connection download files and manage remote systems with ease. Mastering this communication is a vital step in your Coding Journey.
The Connectivity Check: ping
When you type ping google.com it sends a message to Google. If the message comes back to you that means your internet is working fine.
If you see the message “Request Timed Out” that means you have a problem with your internet connection. The Google website is still working the problem is with your internet.
when you do ping google.com and it works you know your internet is okay. If ping google.com does not work you need to check your internet connection.
$ ping google.com PING google.com: 56 data bytes 64 bytes from 142.250.185.78: icmp_seq=0 time=12.3 ms
The Downloader: wget and curl
You want to download a file from a website without using a browser. You can use wget https://website.com/file.zip. It will download the file directly to your terminal.
The website file will be saved on your computer. wget is very useful for downloading website files. On the other hand curl is similar to wget. It is used more by website developers to test website APIs and see if they are working properly.
$ wget https://example.com/file.zip $ curl -O https://example.com/data.json
The Network Tool: ip addr
This replaces the ifconfig command. To find out your computers IP address which’s like a phone number for your computer on the network you can use the ip addr command to see it.
$ ip addr 2: eth0: inet 192.168.1.100/24
⚡ 7. Expert Keyboard Shortcuts
Typing every single character by hand is much too slow. Just like shortcuts in Microsoft Word make writing easier using these basic linux commands and keyboard tricks allows you to move like a pro in the terminal.
By learning these basic linux commands you can auto-complete long file names and jump through your history instantly. These shortcuts are the secret to saving time and working faster on your Coding Journey.
⌨️ TAB Key
When you use the TAB Key it does something called Auto-Complete.If you type the three letters of a folder and then hit the TAB Key Linux will finish the word for you.
This is really helpful when you are working with the TAB Key and folders in Linux. The TAB Key is very useful in this situation because it saves you time when you are using the TAB Key to navigate through folders.
⬆️ UP Arrow
The UP Arrow is really useful because it lets you look at the commands you used before. This means you do not have to type them over again. The UP Arrow helps you scroll through your commands.
🔍 CTRL + R
If you press CTRL + R you can look at your Search History. Let us say you used a word in a command yesterday. If you type that word now Linux will find it for you.
This is really helpful when you do not remember the command but you know one word that was used in it. You can use CTRL + R and type that word and Linux will show you the command that had that word. This way you can easily find commands that you used before even if it was yesterday or some other time.
The Search History is very useful for finding commands. You can use CTRL + R to look at your Search History and find commands by typing a word that you know was used in them.
🧹 CTRL + L
When you press CTRL and L together it will clear the screen away. CTRL and L is an useful shortcut because it gets rid of everything on the screen instantly. You can use CTRL and L to clear the screen whenever you need to.
❓ 8. 20 Critical FAQs About Basic Linux Commands
We have collected the most common questions from our students at Coding Journey to clear confusion around basic Linux commands.
- 1. What is the difference between a shell and a terminal?
The terminal is the window you see. The shell is the program running inside it that understands your commands. Most systems use Bash as the shell.
- 2. Is Linux case-sensitive?
Yes. Linux treats
File.txtandfile.txtas different files. Always be careful with uppercase and lowercase letters. - 3. What if a command does not stop?
Press
CTRL + C. This stops a running command immediately. - 4. What do dot (.) and double dot (..) mean?
.means the current folder...means the parent (one level up) folder. - 5. Why do commands use options like
-l?These are called flags or options. They change how a command behaves or what output it shows.
- 6. Can I use Linux commands on Windows?
Yes. Install Windows Subsystem for Linux (WSL) to run Linux commands inside Windows.
- 7. What is the Home directory?
The Home directory stores your personal files. You can reach it quickly using
~. - 8. How do I see my command history?
Use the command
historyto see previously executed commands. - 9. What is the Root user?
The root user has full control over the system. Mistakes as root can damage the entire OS.
- 10. How do I create a file with text?
Use
echo "Hello world" > greeting.txtto create a file with content. - 11. What does the pipe symbol (
|) do?It sends the output of one command as input to another, e.g.
ls | grep pdf. - 12. Is
rm -rf /safe?No. This command deletes everything on the system. Never run it.
- 13. How do I change my password?
Use the
passwdcommand and follow the prompts. - 14. What is a hidden file?
Files starting with a dot (like
.bashrc) are hidden system or config files. - 15. How do I find a lost file?
Use
find -name "filename.txt"to search for files. - 16. What is APT?
APT is a package manager used to install software, e.g.
sudo apt install vlc. - 17. How do I rename a folder?
Use
mv oldname newname. - 18. How do I check my Linux version?
Run
cat /etc/os-release. - 19. Why does sudo password not show?
Linux hides password input for security. Just type and press Enter.
- 20. What is the best way to learn Linux commands?
Practice daily. Use the terminal for 30 minutes without a mouse.
🚀 Your Next Step
You don’t need to be a genius to master basic Linux commands. Start with one command: ls. Welcome to the Coding Journey.
🚀 Your Next Step
You don’t need to be a genius to master basic linux commands. You just need curiosity. Try opening your terminal today and typing ls. See where it takes you. The journey to becoming a pro starts with a single command. Welcome to the Coding Journey community!