Welcome to the Linux Guide Repository! This repository is a comprehensive resource for anyone looking to:
- Understand Linux as an operating system.
- Install and manage software efficiently.
- Troubleshoot common issues effectively.
- Write custom codes and shell scripts for automation and productivity.
- Overview
- Getting Started with Linux
- Installing Software
- Troubleshooting
- Custom Codes and Shell Scripts
- Contributing
- License
Linux is a powerful, open-source operating system known for its stability, flexibility, and vast ecosystem. It powers everything from personal desktops to large-scale servers. This repository provides hands-on guidance to make the most of Linux, whether you're a beginner or an advanced user.
Popular Linux distributions include:
- Ubuntu: Beginner-friendly with robust community support.
- Fedora: Cutting-edge features with a focus on developers.
- Arch Linux: Lightweight and customizable for advanced users.
- Download the ISO file for your chosen distribution from its official website.
- Create a bootable USB using tools like
Rufus,balenaEtcher, ordd. - Boot into the USB and follow the on-screen instructions to install Linux.
- Partition your drives:
/(Root directory)swap(Optional, for extra memory)/home(User data)
- Reboot and enjoy your Linux system!
Package managers simplify software installation and management. Common ones include:
- APT (Debian-based systems):
sudo apt update sudo apt install <package-name>
- DNF (Fedora-based systems):
sudo dnf install <package-name>
- Pacman (Arch-based systems):
sudo pacman -S <package-name>
- Install Git:
sudo apt install git
- Install Python3:
sudo dnf install python3
-
System Update Errors
- Error: "Failed to fetch updates."
- Fix:
sudo apt update --fix-missing
-
Broken Dependencies
- Fix:
sudo apt --fix-broken install
- Fix:
-
No Internet Connection
- Restart the network service:
sudo systemctl restart NetworkManager
- Restart the network service:
-
Permission Denied
- Add
sudobefore commands requiring administrative rights:sudo <command>
- Add
-
Display Issues
- Restart the display manager:
sudo systemctl restart gdm # Replace 'gdm' with your display manager if needed
- Restart the display manager:
A simple script to back up your home directory to an external drive.
#!/bin/bash
SOURCE="$HOME"
DEST="/media/$USER/Backup"
if [ ! -d "$DEST" ]; then
echo "Backup destination not found!"
exit 1
fi
rsync -av --delete "$SOURCE" "$DEST"
echo "Backup completed successfully!"Monitor your CPU, memory, and disk usage.
#!/bin/bash
echo "CPU Usage: $(grep 'cpu ' /proc/stat | awk '{print ($2+$4)*100/($2+$4+$5) "%"}')"
echo "Memory Usage: $(free -h | awk '/^Mem/ {print $3 "/" $2}')"
echo "Disk Usage: $(df -h | awk '$NF=="/"{print $5}')"- Make the script executable:
chmod +x script.sh
- Execute the script:
./script.sh
Contributions are welcome! If you have suggestions, new scripts, or fixes to existing issues, feel free to:
- Fork this repository.
- Create a new branch for your feature or fix.
- Submit a pull request.
This repository is licensed under the MIT License.
Happy Linux-ing!