Master Linux command line fundamentals. Learn file management, permissions, and system administration.
Linux is a free and open-source operating system kernel. It's the foundation of many operating systems (distributions) like Ubuntu, CentOS, and Debian.
uname -a
cat /etc/os-releaseDisplay system information and Linux distribution
Understanding the Linux file system is crucial. Everything in Linux is a file, and the file system starts at the root directory (/).
pwd
ls
ls -la
cd /home/user
cd ..
cd ~Navigate the file system
mkdir my-folder
mkdir -p parent/child
rmdir my-folder
rm -rf my-folderCreate and remove directories
Linux provides powerful commands for creating, copying, moving, and deleting files.
touch myfile.txt
echo "Hello" > myfile.txt
echo "World" >> myfile.txtCreate and write to files
cat myfile.txt
less myfile.txt
head myfile.txt
tail -f myfile.txtRead file contents
cp source.txt dest.txt
cp -r folder1 folder2
mv old.txt new.txt
rm myfile.txtCopy, move, and delete files
Linux uses a permission system to control access to files and directories.
ls -l myfile.txt
chmod 755 myfile.txt
chmod u+x myfile.txt
chown user:group myfile.txtView and modify file permissions
Processes are running programs. Linux provides tools to view, manage, and control processes.
ps aux
ps aux | grep nginx
top
htopView running processes
kill 1234
kill -9 1234
killall nginx
command &Manage processes
Package managers help install, update, and remove software.
sudo apt update
sudo apt upgrade
sudo apt install nginx
sudo apt remove nginxAPT package manager (Ubuntu/Debian)
sudo yum update
sudo yum install nginx
sudo dnf install nginxYUM/DNF package manager (CentOS/RHEL)
Linux provides powerful networking tools for troubleshooting and managing network connections.
ip addr show
ping google.com
ping -c 4 google.comView network configuration and test connectivity
nslookup google.com
dig google.com
netstat -tuln
ss -tulnDNS queries and port monitoring
wget https://example.com/file.zip
curl -O https://example.com/file.zip
scp file.txt user@server:/path/Download and transfer files
Linux excels at text processing with powerful command-line tools.
grep "error" log.txt
grep -r "TODO" ./src/
find /home -name "*.txt"
sed 's/old/new/g' file.txtSearch and process text
ls - List filescd - Change directorygrep - Search textchmod - Change permissions