Table of Contents
- Introduction
- What is Linux?
- Why Use Linux?
- Different Distributions of Linux
- How to Install Linux
- Basic Linux Commands
- Tips for Beginners
Introduction
Welcome to part 1 in our Linux for Beginners series! This is the first article in a series designed to introduce you to the world of Linux. This article is aimed at beginners with little to no experience in Linux. By the end of this series, you’ll have a good understanding of what Linux is, how to use it, and even some tips and tricks to get the most out of your Linux experience.
What is Linux?
Linux is an open-source operating system based on Unix. It was first created by Linus Torvalds in 1991, and since then it has become a popular choice for many different applications, from servers to desktops, smartphones to supercomputers. Linux is known for its stability, security, and flexibility.
Linus Torvalds, Creator of Linux
Why Use Linux? 🐧
There are many reasons why you might want to use Linux.
🆓Open-Source: Linux is free and open-source, which means that you can view, modify, and distribute the source code. This gives you a level of control over your operating system that you simply can’t get with proprietary software.
🔒 Secure: Linux is highly secure, making it a great choice for any system that handles sensitive data.
🔧 Customizable: With Linux, you can control every aspect of your operating system, making it highly customizable.
🤝 Community Support: Because of its open-source nature, Linux has a large and active community that can provide support and create new features and applications.
🤔 Curiosity: For many people, curiosity is a driving force behind their desire to learn Linux. Simply wanting to learn more about the technology that powers a large portion of the digital world can be a great reason to dive into Linux.
Different Distributions of Linux
Linux comes in many different flavors, or “distributions”. These distributions can vary in terms of their user interface, the software they include, and their focus (e.g., stability vs. cutting-edge software). Some popular Linux distributions include Debian, Ubuntu, Fedora, and Arch Linux.
Debian
- User interface: GNOME, KDE Plasma, Xfce, and LXDE
- Software included: A wide range of software, including the GNU Compiler Collection, the GNU Debugger, and the GNU Emacs editor
- Focus: Stability and community
- Interesting fact: Debian is the oldest continuously-developed Linux distribution.
- Documentation: Debian Documentation
Ubuntu
- User interface: GNOME
- Software included: A wide range of software, including the LibreOffice suite, GIMP, and VLC media player
- Focus: Stability and ease of use
- Interesting fact: Ubuntu is the most popular Linux distribution in the world.
- Documentation: Ubuntu Documentation
💡 Did you know that Ubuntu, one of the most popular Linux distributions, has its roots in Debian? Ubuntu is like a sibling to Debian, built upon its solid foundation and architecture. They share the same package management system (APT) and many other components. However, Ubuntu has its own captivating personality!
Fedora
- User interface: GNOME and KDE Plasma
- Software included: A wide range of cutting-edge software, including the latest versions of the GNU Compiler Collection, the GNU Debugger, and the GNU Emacs editor
- Focus: Innovation and new technologies
- Interesting fact: Fedora is the first Linux distribution to use the systemd init system.
- Documentation: Fedora Documentation
Arch Linux
- User interface: Customizable
- Software included: A minimal set of software, with the user responsible for installing additional software as needed
- Focus: Customizability and bleeding-edge software
- Interesting fact: Arch Linux is the most popular rolling-release Linux distribution.
- Documentation: Arch Linux Wiki
These are just a few of the many different Linux distributions that are available!
How to Install Linux
In this series, we’ll focus on installing a Debian-based distribution called Ubuntu, as it is one of the most beginner-friendly distributions. In later articles, we’ll discuss how to install Linux as a dual-boot system alongside other operating systems.
Installing Ubuntu on Windows with WSL
The Windows Subsystem for Linux
, also known as WSL, is like a magic bridge between Windows and Linux. It allows you to run Linux on your Windows computer without needing a separate machine or complicated setup. It’s like having the power of Linux living inside your Windows system. This is super cool for two main reasons. First, it gives you the ability to use Linux commands and programs right on your Windows machine, making it easier to learn and use Linux. Second, if you’re interested in coding, WSL lets you develop software using Linux tools, all from the comfort of your Windows environment. Plus, it’s speedy and efficient, giving you a smooth and fast Linux experience on your Windows computer!
Here is a brief overview of how to install Ubuntu using WSL:
- Open PowerShell as Administrator and run:
wsl --install
. This will install WSL and Ubuntu automatically.Restart your computer if required.
- Open the Microsoft Store and search for Ubuntu.
- Click “Get” to download and install Ubuntu.
- Once installed, launch Ubuntu. You will be prompted to enter a new user account (username and password) for Ubuntu.
- Once you have entered your new user account details, you will be able to use Ubuntu.
Updgrade to WSL 2
WSL 2 Provides a Linux kernel running inside Windows and will provide better performance and compatibility than WSL 1. To upgrade to WSL 2, follow these steps:
- Open PowerShell as Administrator and run:
wsl --set-default-version 2
. This sets the default WSL version to 2. - To check the WSL version assigned to each of the Linux distributions you have installed, open PowerShell and run this command:
wsl --list --verbose
.
Example Launching Ubuntu from the Microsoft Store:
- Open the Microsoft Store and search for Ubuntu.
- Click “Get” to download and install Ubuntu.
- Once installed, launch Ubuntu. You will be prompted to enter a new user account (username and password) for Ubuntu.
You’ll be greated with a lovely Ubuntu Prompt once a user name and password have been set.
💡 The prompt penguin0@batteleship is the username and hostname of the computer. The ~ symbol indicates that you are in the home directory of the user. The $ symbol indicates that you are a regular user and not a superuser (root).
Always Update Your System First!
Before diving into the exciting world of Ubuntu, it’s crucial to remember the golden rule: Always update your system first!
Updating your system ensures that you have the latest security patches, bug fixes, and improvements installed. It’s like giving your Ubuntu system a fresh boost and ensuring it’s running smoothly and securely.
To update your Ubuntu system, open a terminal and run the following command:
bash
sudo apt-get update && sudo apt-get upgrade
Let’s break down what this command does:
apt-get update
: This command updates the package lists for upgrades and new package installations. It fetches the latest information about available packages from the Ubuntu repositories.apt-get upgrade
: This command upgrades the installed packages on your system to their latest versions. It takes into account any updates or bug fixes released since your initial installation.&&
: This is a logical operator that allows you to run multiple commands in a single line. In this case, it allows you to run theapt-get update
andapt-get upgrade
commands together.
By running these commands, you’ll have the most up-to-date software packages and a system that’s ready to take on new adventures with optimal performance and security. Remember to enter your password when prompted as sudo
grants administrative privileges for system updates.
Installing Ubuntu on MacOS
Installing Linux on MacOS usually involves running it inside a virtual machine. We’ll use a popular and free tool called VirtualBox for this:
- Download VirtualBox from the official website and install it.
- Download the Ubuntu ISO file from the official Ubuntu website.
- Open VirtualBox and click on “New”. Provide a name for your virtual machine, choose “Linux” as the type and “Ubuntu” as the version.
- Set the memory size. A minimum of 1024 MB is recommended for Ubuntu.
- Choose to create a new virtual hard disk.
- Choose the hard disk file type. The default is VDI (VirtualBox Disk Image) which works fine.
- Choose whether the new virtual hard disk should grow as it is used (dynamically allocated) or if it should be a fixed size. The dynamic option saves space.
- Set the size of the new virtual hard disk.
- Click on “Create”.
- With the virtual machine highlighted, click on “Start” and select the Ubuntu ISO file downloaded earlier.
- Follow the prompts to complete the Ubuntu installation.
Basic Linux Commands
Linux commands are the essence of the entire Linux operating system. They are essential for interfacing with the system, managing files, and performing various tasks. Here are some basic Linux commands:
cd
: Change directory. Used to switch between directories in the system.ls
: List. Used to view the contents of a directory.pwd
: Print working directory. Shows the full pathname of the current working directory.cp
: Copy. Used to copy files or directories.mv
: Move. Used to move files or directories.rm
: Remove. Used to delete files and directories.mkdir
: Make directory. Creates a new directory.cat
: Concatenate. Used to list the contents of files.touch
: Used to create a new empty file.sudo
: SuperUser Do. Used to perform tasks that require administrative or root permissions.apt-get
: Advanced Packaging Tool. Used to handle packages in Ubuntu.
Tips for Beginners
Finally, we’ll provide some tips and tricks for beginners to help you get started with Linux:
- Use the Man Pages: Every Linux command comes with a manual. To access it, type
man
followed by the command name. For example,man cd
will show the manual for thecd
command. - Don’t be Afraid of the Terminal: While it may seem intimidating at first, the terminal is a powerful tool that can make your work more efficient. Start with basic commands and gradually learn more.
- Keep Your System Updated: Linux distributions regularly release updates that include security patches, bug fixes, and new features. Update your system regularly using the
sudo apt-get update && sudo apt-get upgrade
command in Ubuntu. - Explore: The best way to learn Linux is by exploring. Don’t be afraid to try new things.