This blog post introduces the fundamental concepts needed to get started with Linux.

Linux is arguably the most popular operating system (OS) in the world, and it is definitely a must-learn for software engineers, operations teams, and DevOps professionals. In this article, we will start by covering the basics of Linux. Before diving in, we'll first go over some fundamental concepts that are essential to understanding what Linux is, why it is popular, and how to set up an environment for learning Linux.
Operating System
An operating system (OS) is a layer of software that sits on top of the hardware to manage hardware and software resources (such as CPU, RAM, network, storage, and devices) and provide interfaces for user interactions. The core component of an OS is the kernel, which sits closest to the hardware and manages resources to execute programs.

Another component of an OS is the shell, which interprets the commands (i.e., what users want the computer/OS to do) received by the kernel and provides a command-line interface (CLI) for users to input commands and view output. We can now fully understand SSH, as covered in the article Network Engineering #6 - SSH, as the protocol for logging into the shell and viewing the CLI of a remote computer to execute commands on that computer.
Some commands, like moving between files, displaying a string on the CLI, and exiting the shell, are called internal commands and can be directly executed by the shell. Other commands, like defining an environment variable, creating a new directory, or opening a file's contents to display on the CLI, require the shell to delegate execution to the kernel and are called external commands. The diagram above illustrates how internal and external commands are received by the kernel, interpreted, executed, and displayed to the user.
An OS also often includes a graphical user interface (GUI), which serves as an alternative to the shell, offering a more intuitive way to interact with the system. While the GUI has a much smoother learning curve, it provides less control than the CLI. Hence, developers typically prefer the CLI for greater control, unlike casual users. (If you've ever built software, you’ve likely interacted with the CLI to manage dependencies and execute your programs.)
Why Linux?
As we can see from the explanation above, an OS is fundamental software for any computer (including embedded systems, web servers, and database servers). As developers, we need to interact with the OS to manage dependencies, run our programs, and handle networking via the CLI, either directly or remotely through SSH. There are many available OS options, such as macOS and Windows, but Linux is arguably the most popular one among developers due to its well-maintained and extensively tested open-source nature. Under its license, Linux can be freely distributed, modified, and used for commercial purposes. Additionally, Linux tends to be lightweight (and therefore cost-effective) and is supported by many DevOps tools like Docker, Kubernetes, Terraform, and others, which we will address later in this series.
Note: Linux is technically just the kernel of the operating system. To allow anyone to build user interfaces like the CLI or GUI, Linux exposes system calls via the Linux API, which are functions that provide limited access to kernel functionalities from userspace. The GNU C Library provides wrapper functions for these system calls, allowing developers to create user interfaces. Based on the Linux kernel and this library, developers around the world have built and distributed various versions of the OS, such as Ubuntu, Debian, and Fedora, which we refer to as distributions (distros) and use in our day-to-day work.
Setting Up Environment
You can install a Linux distro directly on your machine, but this requires time, effort, and disk space.
If you're just trying Linux out, you can use Docker to run a virtualized distro shell quickly.
(We’ll cover Docker in a future article. Here, we’ll focus on how to set up a Linux learning environment using Docker.)
To get started, install Docker by following the instructions on this link.
After installing Docker, run the docker -v
command in your terminal or command line to verify the installation
by checking if the Docker version is displayed.
Once Docker is successfully installed, run the command docker pull ubuntu
to download the Docker image for Ubuntu.
To verify that the image was successfully downloaded, run docker images
to check if "ubuntu" appears in the repository list.
To create and start a container from the image, run docker run -d -it --name test ubuntu
. You can then enter the container's shell
with the command docker exec -it test bash
. If you see root@~
in your terminal, it means you've successfully set up an Ubuntu pseudo-terminal.
To confirm, run the pwd
command and check for the expected output from the terminal. To exit the pseudo-terminal, press Ctrl+D
or type exit
.
To restart the pseudo-terminal later, use docker exec -it test bash
.
Conclusion
In this article, we covered the fundamental concepts of operating systems, Linux, and how to set up a learning environment using Docker. In the next article, we will delve into key Linux concepts and learn how to interact with Linux effectively.
Resources
- Linux Journey. n.d. Kernel. Linux Journey.
- PythonプログラミングVTuberサプー. 2024. 【Linux入門】初心者向け!Linuxの基本的なコマンド操作を学ぼう! 〜 Ubuntu 環境で実演〜. YouTube.
- sxarp. 2019. システムコールとは何なのか. Qiita.
- S4nTo. 2024. 仕組みと一緒に作りながら学ぶシェル. Qiita.