-
Notifications
You must be signed in to change notification settings - Fork 0
Linux Basics Guide
Realgar edited this page Jan 8, 2025
·
3 revisions
This guide outlines key steps to help you confidently transition from Windows to Linux, empowering you to fix problems and customize your experience.
Most Linux distributions have a shortcut for the terminal (Ctrl+Alt+T on Ubuntu).
-
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
nanoorvim. For example:-
nano file_name: Opens a file for editing innano. - Save in
nanowithCtrl+O, then exit withCtrl+X.
-
- Learn
-
/: Root directory where the entire OS resides. -
/home: User files and settings. -
/swap: Acts as RAM overflow space. -
/boot: Contains boot loader files.
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 /
- Create a folder for the mount point:
mkdir /mnt/my_partition - Mount a partition:
sudo mount /dev/sdX /mnt/my_partition
chroot changes the apparent root directory for the terminal session, useful for troubleshooting and fixing broken systems.
- Boot into a live Linux environment (from a USB or CD).
- 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 - Enter
chroot:sudo chroot /mnt
A boot loader (like GRUB) is software that loads your OS.
- Boot into a live environment.
- Mount your root partition:
sudo mount /dev/sdX /mnt - Install GRUB:
sudo grub-install --boot-directory=/mnt/boot /dev/sdX - Update GRUB configuration:
sudo update-grub
- Learn the hierarchy (e.g.,
/etcfor configurations,/var/logfor logs).
- Check logs for issues:
journalctl -xeorcat /var/log/syslog - Learn to identify processes:
toporhtop
- Start with a beginner-friendly distribution like Ubuntu or Fedora.
- Break your learning into small, manageable chunks.
- Create a test environment (e.g., virtual machine with VirtualBox).
- Break things intentionally and fix them to build confidence.
Linux offers various desktop environments (DEs) to suit different workflows and preferences. Here are some popular ones:
- 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.
- 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.
- 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.
- 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).
- Pick a Linux distribution that supports multiple DEs (e.g., Fedora, Ubuntu).
- Test DEs using live USB sessions or install them alongside each other.
- Spend time in each environment to determine which fits your workflow best.
- 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.