DEV Community

Ajitesh for CyberVulnx

Posted on

Linux For Beginners : Part 1

Introduction:

Linux is one of the most important operating systems in modern computing. It is used in servers, cloud systems, DevOps, and cybersecurity environments.

This series is made for beginners. It is also useful for students and aspiring SOC or cybersecurity learners who want to build a strong foundation in Linux.

In this first article, you will learn:

  • What Linux is ?
  • Where it came from.
  • Why is it open source?
  • The basic Linux philosophy.
  • A simple view of Linux architecture.
  • The Linux file system.
  • A few basic commands.
  • How to start practicing Linux safely.

Linux matters because it is used widely in real-world IT. Many production servers, cloud platforms, and security tools run on Linux.

For cybersecurity learners, Linux is especially useful because many logs, commands, and investigation tasks are done in the terminal. Learning Linux gives you a strong base for blue teaming, SOC operations, and forensics.

Red teamers need Linux because many attack, reconnaissance, and post-exploitation tools run on it, and understanding the system helps them work more effectively in real environments.

Origin of Linux and Why It Was Created

Linux has an interesting history that begins with a simple idea: giving people the freedom to use, study, modify, and improve an operating system. To understand Linux, it is helpful to know why it was created and how it evolved into one of the world's most widely used operating systems.

Origin of Linux:
Before Linux, Unix was one of the most popular operating systems used in universities, research institutions, and large organizations.

Although Unix was powerful and reliable, many versions were commercial, expensive, and not easily accessible to students and hobbyists.

In 1991, Linus Torvalds, a computer science student at the University of Helsinki, Finland, started developing a new operating system kernel as a personal project.

His goal was to create a free, Unix-like kernel that anyone could use, learn from, and improve.

On August 25, 1991, Linus announced his project on the Usenet newsgroup comp.os.minix, inviting others to contribute. This collaborative approach marked the beginning of what would become the Linux community.

As developers around the world joined the project, Linux rapidly evolved through community collaboration and continuous improvement.

It is important to remember that Linux is a kernel, not a complete operating system. A complete Linux operating system is created by combining the Linux kernel with software from the GNU Project and other open-source applications. These complete systems are known as Linux distributions (distros), such as Ubuntu, Debian, Fedora, Arch Linux, and openSUSE.

Why Was Linux Created?:
Linux was created to overcome several limitations that existed at the time.

Existing Unix systems were often proprietary, expensive, and difficult for individuals to access or modify.

Linus Torvalds wanted a flexible and Unix-like operating system that he could use and customize on his own computer.

He believed that software development could benefit from collaboration, where developers worldwide could contribute ideas, fix bugs, and improve the system together.

Linux was designed to be portable, stable, efficient, and adaptable for different hardware platforms (Like x86 based, ARM, RISCV, etc).

Because the source code was openly available, users could learn how the operating system worked, customize it to their needs, and contribute improvements back to the community.

This open development model helped Linux evolve rapidly and gain widespread adoption in education, research, enterprise computing, cloud platforms, embedded systems, and cybersecurity.

Why Linux Is Open Source:

Linux is open source because its source code is publicly available. This means people can view it, study how it works, modify it, and share improvements with others.redhat.

This openness is one of the main reasons Linux grew so quickly. It allows developers, companies, and communities to work together, fix problems faster, and improve the system over time.opensource.

For beginners, the simple idea is this: Linux is open source because it gives users more freedom, more transparency, and more control over the software they use.

Linux Philosophy:
Linux is more than just an operating system - it follows a set of design principles that make it simple, flexible, and efficient. These principles, often referred to as the Linux philosophy , encourage building software that is easy to understand, reusable, and capable of working well with other tools.

Some of the key principles of the Linux philosophy are:

  • Do one thing and do it well: Most Linux commands are designed to perform a single task efficiently. Complex tasks can be completed by combining multiple simple commands.
  • Everything is a file: In Linux, many system resources such as hardware devices, configuration files, and processes are represented as files, making them easier to access and manage.
  • Build small & reusable tools: Instead of creating one large program for every task, Linux provides many small utilities that can be combined to solve complex problems.
  • Combine commands using pipes and redirection: The output of one command can be used as the input for another, allowing users to create powerful command sequences without writing complex programs.
  • Prefer text-based configuration: Many Linux applications store their settings in plain text files, making them easy to read, edit, back up, and automate.
  • Automate repetitive tasks: Linux encourages automation through shell scripts and command-line tools, helping administrators and developers save time and reduce manual effort.
  • Keep the system modular: Different parts of the operating system are designed to work independently while cooperating with one another. This makes Linux easier to maintain, customize, and troubleshoot.

By learning the Linux philosophy early, beginners can better understand why Linux works the way it does and develop good habits for system administration and automation.

Linux Architecture:

Source : https://www.scaler.com/topics/linux-kernel-architecture/

Linux follows a layered architecture, which means each part of the system has a specific role. The diagram shows how user applications communicate with the operating system through the GNU C Library, the system call interface, and then the kernel.

User applications: These are the programs people use directly, such as browsers, editors, terminal tools, and file managers. They run in user space and do not access hardware directly.

GNU C Library (glibc): acts as a bridge between applications and the kernel. It provides common functions that programs use to interact with the operating system in a standard way. This makes software development easier because applications do not need to deal with low-level hardware details

System call interface: This is where a program asks Linux to perform a task such as opening a file, creating a process, or sending data over the network. In simple words, system calls are the requests applications make to the kernel.

Kernel: is the core of Linux. It manages processes, memory, files, devices, and networking. It is the most important part of the operating system because it controls how system resources are used and shared.

Architecture-dependent kernel code : This part helps Linux work with different hardware platforms, such as x86 or ARM systems. That is one reason Linux can run on such a wide range of devices.

Hardware platform: which includes the CPU, RAM, storage, and other devices. Linux sits between the applications and the hardware, making sure both sides communicate properly.

This separation between user space and kernel space is important for stability and security. User programs stay in user space, while the kernel handles sensitive operations in kernel space. This reduces direct hardware access and helps protect the system from errors in applications.

Linux File System:

One of the first concepts every Linux user should understand is the Linux file system. Whether you are a system administrator, developer, or cybersecurity professional, knowing how files and directories are organized is essential for navigating and managing a Linux system.

Unlike Windows, which organizes storage using multiple drive letters such as C: or D:, Linux uses a single hierarchical directory structure that begins at the root directory (/). Every file, directory, storage device, and mounted filesystem exists somewhere under this root, forming a tree-like structure.

Source : https://www.devopsschool.com/blog/linux-tutorials-root-file-systems-in-linux/

Learning how the Linux file system is organized is one of the first practical skills introduced in many cybersecurity training platforms, including TryHackMe, because almost every task - from locating configuration files to analyzing logs - requires efficient navigation through directories.

Files:
A file is a collection of data stored on the system. Files may contain text, images, videos, source code, configuration settings, executable programs, or system logs.

Examples include:

  • notes.txt : Text document
  • photo.jpg : Image file
  • script.sh : Shell script
  • config.conf : Configuration file
  • access.log ; System or application log

One unique characteristic of Linux is that many resources, including devices and configuration information, are represented as files.

Directories:
A directory (also called a folder) is used to organize files and other directories into a structured hierarchy.

Understanding Paths:

A path tells Linux where a file or directory is located.

There are two types of paths:

1. Absolute Path:

An absolute path always starts from the root directory (/) and specifies the complete location.

Example: “/home/student/Documents/report.txt”

No matter where you are currently working, this path always points to the same file.

2. Relative Path:

A relative path starts from your current working directory instead of the root.

If your current directory is: “/home/student”

then the relative path: “Documents/report.txt”

points to the same file as: “/home/student/Documents/report.txt”

Relative paths are shorter and commonly used while navigating within the current directory structure.

Basic Commands:

Here are some basic Linux commands. These are enough for to get in touch with Linux, try to execute those commands on any Linux distro. There are many video resources which will help be much helpful for downloading and running Linux.

  • pwd : shows your current location in the file system.
  • ls : lists files and folders in the current directory.
  • cd : changes the directory.
  • mkdir : creates a new directory.
  • touch : creates an empty file.
  • cp : copies files or folders.
  • mv : moves or renames files and folders.
  • rm : removes files.
  • cat : displays the content of a file.
  • clear : clears the terminal screen.
  • man : shows the manual page for a command.
  • whoami : shows the current logged-in user.

Explanation: These commands are the starting point for using Linux from the terminal. They help you navigate folders, create files, manage content, and understand what is happening in the system. Once a beginner gets comfortable with these, it becomes much easier to learn permissions, processes, networking, and scripting later in the series.

Short example:
If you want to create a folder and enter it, you can use:

mkdir practice
cd practice

(Reference: self VM)

Getting Started with Practice:

The best way to learn Linux is by using it regularly in a safe environment. Beginners do not need to start on a real server right away, because there are many free and simple options for practice.

Good places to begin:

What to practice first ?

  • Navigating folders with pwd, ls, and cd.
  • Creating and deleting files with touch and rm.
  • Making folders with mkdir.
  • Reading files with cat and man.
  • Moving and renaming files with mv.
  • Copying files with cp.

The Roadmap for the series:

After Article 1, the series can continue like this:

Linux Commands for Beginners

Linux File System in Detail

Users and Groups

Permissions and Ownership

Processes and Services

Package Management

Networking Basics in Linux

Shell Basics and Shell Scripting

Logs and Troubleshooting

Linux for Cybersecurity and SOC Operations

References:

Top comments (0)