Fedora Linux is a free, open-source Linux distribution developed by the Fedora Project and sponsored by Red Hat. It's known for its rapid innovation, integration of cutting-edge open-source technologies, and its role as a testing ground for features that eventually make their way into Red Hat Enterprise Linux (RHEL). Fedora is suitable for developers, system administrators, and users who want the latest Linux advancements.
Fedora offers different "Editions" and "Spins" tailored for specific use cases and desktop preferences.
These are official variants of Fedora that include different desktop environments or specialized software sets.
Specialized bundles of software for specific purposes, like Design Suite, Games, Scientific, Security Lab, or Python Classroom.
You can install Fedora in several ways:
# To install an RHEL-compatible distro (like AlmaLinux or Rocky Linux) on WSL:
wsl --install -d AlmaLinux # or RockyLinux
Fedora Workstation uses the GNOME desktop environment, providing a modern and user-friendly interface.
# Example: Customizing appearance via GUI
# 1. Click on "Activities" (top-left) or press the Super key.
# 2. Type "Settings" and open the Settings application.
# 3. In the sidebar, click on "Appearance".
# 4. Change "Style" (Light/Dark), "Accent color", "Icon size", etc.
# 5. Observe changes on your desktop.
The command-line interface (CLI) is fundamental for managing Fedora. Open a "Terminal" application (e.g., from the Dash or Activities search).
pwd
# Example Output: /home/yourusername
ls -l # Long format (details: permissions, owner, size, date)
ls -a # List all files, including hidden ones (starting with .)
ls -lh # Long format, human-readable sizes (KB, MB, GB)
ls /var/log # List contents of a specific directory
cd Documents # Move into 'Documents'
cd .. # Move up one directory
cd ~ # Move to your home directory
cd / # Move to the root directory
cd - # Move to the previous directory
mkdir my_new_folder
mkdir -p projects/my_app # Creates parent directories if they don't exist
rmdir my_empty_folder
touch new_document.txt
touch script.sh
cp file1.txt file2.txt # Copy file1.txt to file2.txt in same directory
cp image.jpg /home/user/Pictures/ # Copy to another directory
cp -r my_folder /backup/ # Copy a directory recursively
mv old_name.txt new_name.txt # Rename a file
mv document.pdf /archive/ # Move file to /archive/
rm unwanted_file.txt
rm -i important_file.txt # Prompt before deleting
rm -r my_folder # Remove a directory and its contents recursively (USE WITH CAUTION!)
rm -f stubborn_file.txt # Force remove (no prompt)
rm -rf very_critical_folder # Force remove recursively (EXTREME CAUTION: Irreversible!)
cat my_document.txt
cat /etc/os-release # Show OS information
less /var/log/messages # Press Space to scroll, 'q' to quit
head -n 5 file.txt # Show first 5 lines
tail -n 10 file.txt # Show last 10 lines
tail -f /var/log/audit/audit.log # Follow a log file in real-time (Ctrl+C to exit)
echo "Hello, Fedora!"
man dnf # Press 'q' to quit
sudo dnf update # Update package lists (requires password)
Fedora, like other Linux distributions, adheres to the Filesystem Hierarchy Standard (FHS), which defines a standardized directory structure.
Linux security relies on file permissions and ownership to control access to files and directories.
Permissions are assigned to three categories:
ls -l my_script.sh
# Example Output: -rwxr-xr-- 1 yourusername yourusername 1234 Jul 19 10:00 my_script.sh
Breakdown of `-rwxr-xr--`:
Can use symbolic mode (r, w, x, u, g, o, a) or octal (numeric) mode.
chmod 755 my_script.sh # Owner: rwx (7), Group: r-x (5), Others: r-x (5)
# Visual: -rwxr-xr-x
chmod 644 my_document.txt # Owner: rw- (6), Group: r-- (4), Others: r-- (4)
# Visual: -rw-r--r--
chmod +x my_script.sh # Add execute permission for all (commonly used for scripts)
Requires `sudo` (superuser privileges).
sudo chown webadmin:webadmin /var/www/html/index.html
sudo chown -R newuser:newgroup /opt/my_app # Recursively change for folder contents
sudo chgrp developers /home/shared_project
Fedora provides commands for managing user accounts and groups.
id yourusername
# Output example: uid=1000(yourusername) gid=1000(yourusername) groups=1000(yourusername),10(wheel),27(sudo)...
sudo adduser newuser
# Follow prompts for password and user information.
sudo useradd -m -s /bin/bash newuser2 # -m: create home dir, -s: set shell
passwd # Change your own password
sudo passwd newuser # Set password for newuser
sudo usermod -aG wheel newuser # Add newuser to 'wheel' group (grants sudo privileges on Fedora)
sudo usermod -l new_name old_name # Change username (careful with this!)
sudo usermod -d /home/customhome newuser # Change home directory
sudo userdel olduser # Delete user, but leave home directory
sudo userdel -r olduser2 # Delete user and remove home directory
Groups are collections of users, simplifying permission management for multiple users.
sudo groupadd webdevs
sudo groupdel oldgroup
sudo gpasswd -a newuser webdevs # Add newuser to webdevs group
sudo gpasswd -d olduser webdevs # Remove olduser from webdevs group
groups # List groups for current user
groups newuser # List groups for newuser
Fedora uses `dnf` (Dandified YUM) as its primary package manager. It's a modern, powerful, and easy-to-use tool for installing, updating, and removing software packages and their dependencies.
sudo dnf check-update # Check for available updates
sudo dnf update # Updates all installed packages
sudo dnf install httpd # Install Apache HTTP Server
sudo dnf install git nano vim # Install multiple packages
sudo dnf remove httpd
sudo dnf erase httpd # Same as remove
dnf search php
dnf info httpd
dnf list installed
dnf list available
sudo dnf group list # List available groups/environments
sudo dnf groupinstall "Development Tools" # Install a group of related packages
sudo dnf autoremove
sudo dnf clean all
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf update
# Now you can install multimedia codecs or proprietary drivers.
Managing running programs and background tasks on your system.
ps aux # Show all running processes (user, CPU, memory usage)
ps -ef # Show all processes in full format
ps -p <PID> # Show info for a specific Process ID
top
htop
kill <PID> # Sends SIGTERM (graceful termination request)
kill -9 <PID> # Sends SIGKILL (forceful termination, cannot be ignored)
pkill firefox # Kills all processes named firefox
killall nginx # Kills all processes named nginx
Fedora uses `systemd` as its init system and service manager. It controls system services (daemons) and boot processes.
systemctl status httpd.service # Check Apache status
# Output shows Active: (running), Loaded: (enabled/disabled), etc.
sudo systemctl start httpd.service
sudo systemctl stop httpd.service
sudo systemctl restart httpd.service
sudo systemctl enable httpd.service
sudo systemctl disable httpd.service
sudo systemctl reload httpd.service
systemctl get-default # Will likely output graphical.target for Workstation
Fedora uses `NetworkManager` for network configuration and `firewalld` for firewall management.
ip a # Shows interfaces like lo, ens33, wlp2s0 (wireless), etc.
ip route show
ping google.com
ss -tulnp # Show TCP/UDP listening ports with process info
nmcli device status # Show network device status
nmcli connection show # Show active network connections
nmcli device wifi list # Scan for Wi-Fi networks
nmcli device wifi connect "Your_SSID" password "Your_WiFi_Password" # Connect to Wi-Fi
sudo systemctl status firewalld # Check firewall status
sudo systemctl start firewalld # Start firewall
sudo systemctl enable firewalld # Enable firewall on boot
sudo firewall-cmd --permanent --add-service=http # Allow HTTP traffic permanently
sudo firewall-cmd --permanent --add-port=8080/tcp # Allow specific port permanently
sudo firewall-cmd --reload # Apply permanent changes immediately
sudo firewall-cmd --list-all # List all active rules for the default zone
Managing disk space, partitions, and file systems on Fedora.
df -h # Human-readable output
du -sh /var/log # Summarize size of /var/log
lsblk
sudo fdisk /dev/sda # Opens interactive partitioning tool for sda
sudo mkfs.ext4 /dev/sdb1 # Format partition sdb1 with ext4 filesystem
sudo mount /dev/sdb1 /mnt/data # Mount sdb1 to /mnt/data
sudo umount /mnt/data # Unmount
# Basic LVM commands (conceptual):
sudo pvcreate /dev/sdb1 # Create Physical Volume
sudo vgcreate myvg /dev/sdb1 # Create Volume Group
sudo lvcreate -L 10G -n mylv myvg # Create Logical Volume
sudo mkfs.xfs /dev/myvg/mylv # Format LV with XFS (common on Fedora)
sudo mount /dev/myvg/mylv /data # Mount LV
Automate tasks by writing a series of commands in a file. Fedora typically uses Bash as its default shell.
# Create a file named 'fedora_status.sh'
nano fedora_status.sh
# Add the following content:
#!/bin/bash
# This script checks basic system status on Fedora
echo "--- Fedora System Status ---"
echo "Hostname: $(hostname)"
echo "Kernel: $(uname -r)"
echo "Uptime: $(uptime -p)"
echo "Disk Free: $(df -h / | awk 'NR==2{print $4} /')" # Free space on root partition
echo "--- End Status ---"
chmod +x fedora_status.sh
./fedora_status.sh
Fedora provides both graphical and command-line text editors.
gnome-text-editor my_document.txt & # & runs in background
nano /etc/nginx/nginx.conf
vim /etc/ssh/sshd_config
Fedora emphasizes strong security, with SELinux and Firewalld enabled by default. Proper configuration is crucial.
sudo dnf update -y
sestatus
sudo setenforce 0 # Switch to Permissive
sudo setenforce 1 # Switch to Enforcing
sudo nano /etc/selinux/config
# Change SELINUX=enforcing to SELINUX=permissive or SELINUX=disabled
# Reboot after changing this file for permanent effect.
sudo ausearch -c 'httpd' --raw | audit2allow -M mywebserver
sudo semodule -i mywebserver.pp # Create and apply custom SELinux policy
sudo systemctl disable <service_name>
sudo journalctl -f # Follow live logs
sudo journalctl -u sshd.service # View SSH daemon logs
Fedora is a community project, and contributions are highly encouraged. You can contribute in various ways:
Visit the Fedora Project Contribute page to learn more.
Fedora is an excellent choice for users who want to experience the cutting edge of Linux. Its commitment to open source, rapid innovation, and strong security features make it a powerful platform for developers, system administrators, and enthusiasts. Embrace its fast-paced development, get comfortable with `dnf` and `systemd`, and always stay updated to get the most out of your Fedora experience.