Introduction to Linux

1. Operating system

An operating system sits between users and hardware. It manages memory, processes, files, and devices while exposing a graphical or command-line interface.

Common operating systems

  • Linux
  • iOS
  • Android
  • macOS
  • Windows

Linux distributions

Examples include Ubuntu, Fedora, Arch, Debian, and openSUSE.

A Linux distribution is the combination of the Linux kernel, user space tools, and the shell environment.


2. Terminal and shell basics

The terminal gives users a text-based interface to run commands.

Typical terminal prompt

  • environment indicator
  • username
  • hostname
  • current directory
  • time
  • prompt symbol

Command flow

  1. The user types a command.
  2. Press Enter to send it to the shell.
  3. The shell interprets and executes it.
  4. The shell prints the result.

3. Useful shell commands

echo "hello"
echo $HOME
man ls
clear
date
which python
uname -a
whoami
top

echo

echo -n "No newline"
echo -e "Hello\nWorld"

man

man man

4. File system layout

Linux uses a single root filesystem:

  • / root directory
  • /bin/ system binaries
  • /dev/ device files
  • /etc/ system configuration
  • /home/ user home directories
  • /mnt/ mounted external filesystems
  • /tmp/ temporary files
  • /usr/ user programs and shared files

ls

ls -lh /

Permissions

Permissions are usually shown as rwx r-x r-x for owner/group/others.

chmod 755 file.txt
chown user file.txt

Summary

Linux is a foundational operating system for software development, servers, and data science workflows. Learning the shell, filesystem, and permissions is essential for effective daily use.

Related articles

Poetry

This file defines project metadata and dependencies. This file pins the exact dependency versions used in the project for reproducibility. --- --- Poetry is ideal for clean, reproducible Python pro…

Training

Python

In Python, values such as integers, strings, lists, and functions are all objects. They have types and methods, which is different from C++ primitive values. --- Lists are ordered, mutable sequence…

Training

Git

Git is a distributed version control system (DVCS) used to: - track changes to files over time - collaborate with multiple people on the same project - manage branches independently - sync code wit…

Training

Advanced Packaging Tool

This document contains frequently used command and the corresponding used cases for package management software Advanced Packaging Tool (APT). For simplification, all the variables are written in p…

Training