💻 Ubuntu Server Installation & Linux Basic Commands | Full Tutorial 🐧⚙️
Master Linux from scratch! In Part 1, learn to install Ubuntu Server step‑by‑step. In Part 2, explore essential Linux commands every beginner must know — from file navigation to system monitoring.
Downloading the Ubuntu Server ISO 📥
The first step is to get the official Ubuntu Server installation image. This is a free download directly from Canonical (the company behind Ubuntu).
- Visit ubuntu.com/download/server — Go to ubuntu.com/download/server. The site automatically detects the latest LTS (Long Term Support) version, which is recommended for stability — currently Ubuntu 24.04 LTS.
- Choose the ISO — Click the big "Download Ubuntu Server" button. The ISO file is approximately 2.6 GB. You can also use the torrent link for faster download.
- Verify the Checksum (Optional but Recommended) — After downloading, verify the file integrity using PowerShell (Windows) or Terminal (macOS/Linux) to ensure the ISO isn't corrupted.
# Windows (PowerShell) Get-FileHash .\ubuntu-24.04-live-server-amd64.iso -Algorithm SHA256 # macOS / Linux shasum -a 256 ubuntu-24.04-live-server-amd64.iso # Compare the output with the checksum on the Ubuntu website
Creating a Bootable USB Drive 💽
You'll need a USB flash drive (at least 8 GB) and a tool to write the ISO. Here are the best free options for each operating system:
- 🪟 Windows: Use Rufus (rufus.ie). It's fast, reliable, and automatically detects the correct settings for Ubuntu. Select the ISO, choose your USB drive, and click Start. Accept the prompt to write in ISO mode.
- 🍎 macOS: Use balenaEtcher (etcher.balena.io). It's a simple 3‑step process: select ISO, select drive, flash.
- 🐧 Linux: Use the Startup Disk Creator (built into Ubuntu) or the
ddcommand.
# Identify your USB drive (e.g., /dev/sdb) sudo fdisk -l # Write the ISO (replace /dev/sdX with your USB drive) sudo dd if=ubuntu-24.04-live-server-amd64.iso of=/dev/sdX bs=4M status=progress # ⚠️ WARNING: Double-check the drive letter! dd overwrites everything.
Step‑by‑Step Ubuntu Server Installation ⚙️
Insert the USB drive into your target machine and boot from it (you may need to change the boot order in BIOS/UEFI by pressing F2, F12, DEL, or ESC during startup).
- Select Language: Choose your preferred language. English is recommended for server environments.
- Keyboard Configuration: Accept the default or select your layout. Use the "Detect Keyboard Layout" option if unsure.
- Choose Installation Type: Select "Ubuntu Server" (not minimized). For most users, the default installation is perfect.
- Network Configuration: The installer detects your network card. If you're connected via Ethernet, it should auto‑configure via DHCP. You'll see your assigned IP address.
- Proxy Configuration: Leave blank unless you're behind a corporate proxy.
- Storage Configuration: Choose "Use an entire disk" (or LVM for advanced setups). Select the target disk and confirm. This erases the disk!
- Confirm Installation: Review the summary and click "Continue". The base system will install in 5‑10 minutes.
Setting Up Users, Passwords & Basic Network 🔑
After the base installation, you'll configure your user account and optional SSH access:
- Create Your Profile: Enter your full name, server name (hostname), username, and a strong password. This user will have sudo (administrator) privileges.
- Ubuntu Pro (Optional): Skip this unless you need enterprise support. The free tier is sufficient for learning and personal projects.
- Install OpenSSH Server: Check the box to "Install OpenSSH server". This allows you to remotely manage your server via SSH. Highly recommended!
- Reboot: Once installation completes, remove the USB drive and reboot. Your server will boot into the command‑line interface.
Basic Network Check After Login:
# Check your IP address ip addr show # Test internet connectivity ping -c 4 google.com # Update package lists sudo apt update # Upgrade all installed packages sudo apt upgrade -y
sudo nano /etc/netplan/00-installer-config.yaml.
How to Navigate the Linux File System 📂
The Linux file system is a tree structure starting at the root /. Here are the essential navigation commands:
# Show current directory pwd # List files and folders ls -la # -l: detailed view, -a: show hidden files # Change directory cd /home # Go to /home cd .. # Go up one level cd ~ # Go to your home directory cd - # Go to the previous directory # Show directory structure tree # Install with: sudo apt install tree
Key directories to know:
/– Root directory (everything starts here)./home– User home directories./etc– Configuration files./var– Variable data (logs, databases)./tmp– Temporary files (cleared on reboot).
Creating, Editing & Deleting Files and Directories 📝
Mastering file operations is essential. Here's everything you need:
# Create an empty file touch myfile.txt # Create a directory mkdir myfolder mkdir -p parent/child # Create nested directories # Copy files and directories cp source.txt dest.txt cp -r folder/ newfolder/ # Copy recursively # Move or rename files mv oldname.txt newname.txt mv file.txt /home/user/ # Delete files and directories rm file.txt rm -r folder/ # Delete folder and contents rm -rf folder/ # Force delete (use with caution!) # View file contents cat file.txt # Display entire file less file.txt # View with scrolling (q to quit) head -n 20 file.txt # First 20 lines tail -f log.txt # Follow live log updates
Quick text editing: Use nano (beginner‑friendly) or vim (advanced). To edit a file: nano filename.txt. Save with CTRL+O, exit with CTRL+X.
rm, it's gone forever. Always double‑check before pressing Enter.
Searching for Files, Text & Directories 🔍
Linux has powerful built‑in search tools that rival any desktop search:
# Find files by name find /home -name "*.txt" # All .txt files in /home find . -type d -name "backup" # Find directories named "backup" # Find files by size find / -size +100M # Files larger than 100 MB # Search text inside files grep -r "searchterm" /path/ # Recursive search grep -i "error" log.txt # Case‑insensitive # Locate files (faster, uses database) locate myfile.txt # Update DB first: sudo updatedb # Find commands / programs which python3 # Show full path to command
Quick tip: Use grep with pipes to filter output. Example: ls -la | grep ".txt" lists only text files.
Managing Permissions & Ownership 🔐
Linux permissions control who can read, write, or execute files. Each file has an owner, a group, and others.
# View permissions ls -l # Shows permissions like -rwxr-xr-- # Change permissions (symbolic) chmod u+x script.sh # Add execute for user chmod go-w file.txt # Remove write for group & others # Change permissions (numeric – common) chmod 755 script.sh # rwxr-xr-x (owner full, others read+execute) chmod 644 file.txt # rw-r--r-- (owner read/write, others read‑only) chmod 600 secret.key # rw------- (only owner can read/write) # Change owner and group chown user:group file.txt # Change owner and group chown -R user:group folder/ # Recursively change ownership
Understanding numeric permissions: Read=4, Write=2, Execute=1. Add them: 7=rwx, 6=rw, 5=rx, 4=r. For example, 755 means owner rwx, group rx, others rx.
Viewing System Information & Processes 📊
Monitor your server's health, running processes, and resource usage:
# System information uname -a # Kernel version and system info lsb_release -a # Ubuntu version details hostnamectl # Hostname and OS details # Disk usage df -h # Show disk space (human readable) du -sh /home/* # Size of each home directory # Memory usage free -h # RAM and swap usage # Process management top # Live process monitor (q to quit) htop # Prettier top (install: sudo apt install htop) ps aux # List all running processes kill 1234 # Terminate process with PID 1234 kill -9 1234 # Force kill a stubborn process
htop and neofetch for a more visual and informative terminal experience. sudo apt install htop neofetch -y then run neofetch to see your system summary in style.
Tips to Work Faster & Final Checklist ✅
Power user shortcuts for the terminal:
TAB → Auto‑complete commands and file names CTRL + C → Cancel current command CTRL + L → Clear the screen CTRL + R → Search command history CTRL + A → Jump to start of line CTRL + E → Jump to end of line !! → Repeat the last command history → Show command history
- Downloaded Ubuntu Server ISO and verified checksum
- Created a bootable USB drive with Rufus/Etcher/dd
- Installed Ubuntu Server with SSH enabled
- Set up user account and tested sudo access
- Ran sudo apt update && sudo apt upgrade
- Practiced ls, cd, pwd, mkdir, touch, cp, mv, rm
- Tried cat, less, head, tail, nano for file viewing/editing
- Used find and grep to search files and text
- Practiced chmod, chown for permissions
- Monitored system with top, htop, df, free
Key Takeaways
🐧 Ready to Master Linux?
Set up your Ubuntu Server today and practice these commands. The more you use the terminal, the more confident you'll become. Bookmark this guide and refer back to it as you learn!



Join the tech debate...
We love a good discussion, but please keep it respectful and relevant to the topic. Vulgarity, personal attacks, and spam will be removed. Let’s keep the community smart, helpful, and welcoming to all tech fans!