Sunday, October 18, 2026

Linux OS

 


Linux Operating System

Linux is an Open Source Operating System that establishes a connection between computer hardware and the user. It controls and manages the computer's resources and programs.

  • Examples: Ubuntu, Fedora, Debian, and Linux Mint.

  • Developer: Linus Torvalds

  • Year of Development: 1991

  • Key Feature: The source code of Linux is freely available, meaning it can be used, modified, and distributed according to its license.

  • Linux का शुभंकर - Tux, AI generated

  • Linux Mascot: A penguin named Tux.

Features of Linux

  1. Open Source: Its source code is available to everyone for free.

  2. Multiuser: Multiple users can access its resources simultaneously.

  3. Multitasking: It can seamlessly perform multiple tasks at the same time.

  4. Security: It provides robust user account and file permission features.

  5. Portable: It can run on various types of hardware architectures.

  6. Networking: It is highly efficient for network and internet-related tasks.

  7. Stability: It is widely used in servers and systems that require long, uninterrupted uptimes.

Disadvantages of Linux

  • Some popular commercial programs and games are not available on Linux.

  • Installing drivers for certain new or proprietary hardware can be difficult.

  • New users may take time to learn and get comfortable with the Command Line Interface (CLI).

  • Some specific software is developed exclusively for Windows or macOS.

Linux Architecture

Linux आर्किटेक्चर, AI generated

The architecture of Linux is primarily divided into four layers:

LayerFunction / Component
UserThe person interacting with the system.
Application ProgramsWeb browsers, text editors, media players, etc.
Shell / GUIReceives commands and instructions from the user.
KernelCore system that manages CPU, memory, devices, and processes.
HardwarePhysical components like CPU, RAM, Disk, Keyboard, etc.
  • Kernel: The Kernel is the core part of Linux. It manages hardware, memory, CPU, files, and the resources of running programs.

  • Shell: The Shell acts as a command interpreter between the User and the Kernel. It takes commands from the user and helps execute them. (Examples: Bash, Zsh)

Note: Linux can also be operated entirely via a GUI; Shell commands are not strictly mandatory for every everyday task.

6. Linux GUI (Graphical User Interface)

A GUI is an interface where the user operates the computer using icons, menus, windows, and a mouse.

  • It consists of visual elements like icons, windows, and menus.

  • It reduces the need to memorize complex commands.

  • Tasks like opening, copying, and deleting files become highly intuitive.

7. Linux Desktop Environments

Desktop Environments determine the complete look and feel of your Linux system:

  1. KDE Plasma: A highly popular Desktop Environment in Linux. It offers panels, menus, icons, and extensive customization features.

  2. GNOME: Features a very simple, modern, and user-friendly interface that focuses on a distraction-free workflow.

How to Start and Shut Down Linux

Startup Process:

  1. Press the computer's Power Button.

  2. The system will load the Linux OS (Boot process).

  3. When the Login Screen appears, enter your Username and Password.

  4. After logging in, the Desktop will be displayed.

Shutdown Process:

  • Via GUI: Open the System Menu and select the Power Off or Shut Down option.

  • Via Terminal: Use the following command (requires appropriate permissions):

    Bash
    sudo shutdown -h now
    

Linux File System Structure

In Linux, all files and directories are organized under a single main directory called / (Root Directory).

  • / — Root Directory

  • /home — Personal files and directories of standard users

  • /bin — Essential command binaries/programs

  • /etc — System configuration files

  • /dev — Device files (hardware representations)

  • /tmp — Temporary files

  • /var — Variable data (like system logs)

File Naming Rules

  1. File names can consist of letters, numbers, and certain special characters.

  2. Linux is Case-Sensitive (e.g., File.txt and file.txt are treated as two entirely different files).

  3. The forward slash / cannot be used inside a file name, as it is the directory separator.

  4. Spaces are allowed in file names, but when using commands, files with spaces must be enclosed in quotes (" ").

  5. File Extensions (like .txt or .c) are strictly optional in Linux.

File Types

  • Regular File: Standard data, text, or program files.

  • Directory File: A folder that contains lists of other files and directories.

  • Device File: Provides access to hardware devices.

  • Symbolic Link: A shortcut or reference to another file or directory.

Wildcard Characters in Linux

Wildcards are used to search for file names or to select multiple files simultaneously in the terminal.

CharacterFunctionExample
*Matches zero or more charactersls *.txt
?Matches exactly one single characterls file?.txt
[abc]Matches any one of the enclosed charactersls file[123].txt
[0-9]Matches any one character from the specified rangels file[0-9].txt

Key Linux Commands (CLI)

In the CLI (Command Line Interface), the user issues instructions to the computer by typing commands into a Terminal.

A. Directory Commands

  • pwd: Prints the full path of the Present Working Directory.

  • mkdir directory_name: Creates a new directory (e.g., mkdir School).

  • rmdir directory_name: Removes an empty directory.

  • cd directory_name: Changes the directory (e.g., cd School).

  • cd /: Takes you directly to the Root Directory.

  • cd ..: Moves you one level up from the current directory. (Note: Linux uses cd .., not cd \)

B. File Commands

  • touch filename: Creates a new empty file or updates an existing file's timestamp (e.g., touch notes.txt).

  • cat filename: Displays the contents of a file on the screen.

  • cp source destination: Copies a file or directory (e.g., cp notes.txt copy.txt).

  • mv source destination: Moves or renames a file or directory.

  • rm filename: Deletes a file. (Files deleted this way bypass the Trash bin).

C. User & Help Commands

  • who: Displays information about users currently logged into the system.

  • man command_name: Shows the Manual page for a command (e.g., man ls). Press q to exit.

  • more filename: Displays the contents of a long file one screen at a time.

  • clear: Clears the Terminal screen.

D. Date & Text Processing Commands

  • date: Displays the current system date and time.

  • cal 2026: Displays the calendar for the year 2026.

  • wc filename: Counts lines, words, and characters in a file (To count only words: wc -w notes.txt).

  • sort filename: Sorts the lines of a text file in alphabetical order.

  • head -n 5 filename: Displays the first 5 lines of a file.

  • tail -n 5 filename: Displays the last 5 lines of a file.

vi Text Editor

vi is a powerful Terminal-based text editor built into Linux.

How to open: vi notes.txt

3 Main Modes of vi Editor:

  1. Command Mode: This is the default mode when you open vi. It is used for copying, pasting, and deleting text.

  2. Insert Mode (Input Mode): This mode allows you to type and edit text. Press i to enter this mode, and press Esc to return to Command Mode.

  3. Last-Line Mode (Ex Mode): Used for saving files and exiting the editor. Activated by pressing : while in Command Mode.

Useful vi Commands:

CommandFunction
iEnter Insert Mode
EscReturn to Command Mode from Insert Mode
:wSave the file
:qQuit the editor
:wqSave and quit
:q!Quit without saving changes
ddDelete the current line
yyCopy (yank) the current line
pPaste the copied/deleted text

Messaging Commands in Linux

These commands are used to communicate with other users logged into the same system or network.

  1. who: Shows who is currently logged in (useful for knowing who you can message).

  2. mesg y / mesg n: Allows (y) or denies (n) permission to receive messages from others on your terminal.

  3. wall "message": Broadcasts a message to all logged-in users' terminals.

  4. write username: Sends a message to a specific logged-in user. (Press Ctrl+D to end the message).

  5. talk username: Initiates a two-way, interactive live text chat between two users (requires the talk package to be installed).

No comments:

Post a Comment

Open Office

  OpenOffice and StarWriter OpenOffice is an office software package.  It is used to create documents, perform calculations, make ...