Skip to content

Linux Basics Guide

Realgar edited this page Jan 8, 2025 · 3 revisions

Transitioning from Windows to Linux: A Step-by-Step Guide

This guide outlines key steps to help you confidently transition from Windows to Linux, empowering you to fix problems and customize your experience.


Step 1: Learn Basic File Operations in the Terminal

Open the Terminal

Most Linux distributions have a shortcut for the terminal (Ctrl+Alt+T on Ubuntu).

Practice Commands:

  • Copy Files: cp source_file destination_folder
  • Move Files: mv source_file destination_folder
  • Rename Files: mv old_filename new_filename
  • Delete Files: rm file_name
  • Edit Files:
    • Learn nano or vim. For example:
      • nano file_name: Opens a file for editing in nano.
      • Save in nano with Ctrl+O, then exit with Ctrl+X.

Step 2: Understand Linux Partitions

Learn Partition Types

  • /: Root directory where the entire OS resides.
  • /home: User files and settings.
  • /swap: Acts as RAM overflow space.
  • /boot: Contains boot loader files.

List Current Partitions

Run: lsblk

Example Output:

NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  256G  0 disk 
├─sda1   8:1    0  500M  0 part /boot
├─sda2   8:2    0   16G  0 part [SWAP]
└─sda3   8:3    0 239.5G 0 part /

Learn Partition Mounting

  • Create a folder for the mount point: mkdir /mnt/my_partition
  • Mount a partition: sudo mount /dev/sdX /mnt/my_partition

Step 3: Learn About chroot (Change Root)

What is chroot?

chroot changes the apparent root directory for the terminal session, useful for troubleshooting and fixing broken systems.

Enter chroot:

  1. Boot into a live Linux environment (from a USB or CD).
  2. Mount necessary partitions:
    sudo mount /dev/sdX /mnt
    sudo mount --bind /dev /mnt/dev
    sudo mount --bind /proc /mnt/proc
    sudo mount --bind /sys /mnt/sys
    
  3. Enter chroot:
    sudo chroot /mnt
    

Step 4: Understand Boot Loaders

What is a Boot Loader?

A boot loader (like GRUB) is software that loads your OS.

Reinstall or Fix GRUB:

  1. Boot into a live environment.
  2. Mount your root partition: sudo mount /dev/sdX /mnt
  3. Install GRUB:
    sudo grub-install --boot-directory=/mnt/boot /dev/sdX
    
  4. Update GRUB configuration:
    sudo update-grub
    

Step 5: Understand Linux Philosophy

Explore Linux File Systems

  • Learn the hierarchy (e.g., /etc for configurations, /var/log for logs).

Practice Troubleshooting

  • Check logs for issues: journalctl -xe or cat /var/log/syslog
  • Learn to identify processes: top or htop

Step 6: Commit to the Journey

Practice Patience

  • Start with a beginner-friendly distribution like Ubuntu or Fedora.
  • Break your learning into small, manageable chunks.

Experiment

  • Create a test environment (e.g., virtual machine with VirtualBox).
  • Break things intentionally and fix them to build confidence.

Step 7: Explore Different Graphical User Interfaces (GUIs)

Linux offers various desktop environments (DEs) to suit different workflows and preferences. Here are some popular ones:

KDE Plasma

  • Why Choose It? Highly customizable and feature-rich, resembling the Windows experience.
  • Best For: Those who enjoy tweaking and prefer a traditional menu/taskbar layout.
  • How to Try: Install Fedora KDE Spin or Kubuntu.

GNOME

  • Why Choose It? Modern and minimalistic, focused on productivity with an Activities Overview.
  • Learning Curve: Slightly different from Windows but manageable.
  • Best For: Users who prefer simplicity and clean design.
  • How to Try: Install Fedora Workstation or Ubuntu.

Xfce

  • Why Choose It? Lightweight and straightforward, great for older or less powerful machines.
  • Best For: Those wanting a resource-friendly environment.
  • How to Try: Install Xubuntu or Fedora Xfce Spin.

Other Environments to Explore

  • Cinnamon: Polished, modern, mimicking the classic Windows experience (try Linux Mint).
  • Mate: Lightweight and traditional, based on GNOME 2.
  • Pantheon: Elegant and Mac-like (default for Elementary OS).

How to Test and Choose Your Desktop Environment

  1. Pick a Linux distribution that supports multiple DEs (e.g., Fedora, Ubuntu).
  2. Test DEs using live USB sessions or install them alongside each other.
  3. Spend time in each environment to determine which fits your workflow best.
  4. Reinstall the distribution with your preferred DE for a focused setup.

By following these steps, you can transition smoothly into the Linux ecosystem, build confidence in troubleshooting, and personalize your experience to make Linux truly your own.