Master the command line and unleash the power of Linux
The Linux terminal is a powerful tool that gives you direct control over your computer. While it might look intimidating at first, using the terminal can actually make things easier and faster once you get the hang of it. Instead of clicking through menus, you can type commands to perform tasks like installing software, copying files, or checking your system.
One of the coolest things is that you can create your own commands for tasks you do every day. For example, if you find yourself typing the same few commands over and over, you can write a small script, save it as a file, and run it with a single command. This is called automation, and it can save you a lot of time. Think of it like creating shortcuts for the things you do most!
pwd
Print Working Directory (shows current location)
ls
List files and directories in the current folder
cd [directory]
Change Directory (move to another folder)
cd ..
Move up one directory level
cd ~
Go to your home directory
mkdir [name]
Create a new directory
touch [filename]
Create a new empty file
cp [source] [destination]
Copy files or directories
mv [source] [destination]
Move or rename files or directories
rm [filename]
Remove a file
rm -r [directory]
Remove a directory and its contents
cat [filename]
Display the contents of a file
less [filename]
View file contents one page at a time
head [filename]
Show the first 10 lines of a file
tail [filename]
Show the last 10 lines of a file
uname -a
Display system information
top
View running processes and system resources
df -h
Show disk space usage
free -h
Display amount of free and used memory
man [command]
to view the manual page for a specific command.
sudo
before a command to run it with administrative privileges.
Try these commands in your terminal to get familiar with basic operations:
This exercise creates a folder, makes a file, adds content to it, copies and renames the file, and then cleans everything up.