top of page

Learn Linux in Easy Steps

Step 1: Understanding Linux Basics to Learn Linux in




What is Linux?

  • Linux is an open-source operating system based on Unix.

  • It powers servers, desktops, smartphones (like Android), and IoT devices.


Key Terms:

  1. Kernel: The core of Linux that communicates with hardware.

  2. Distribution (Distro): A version of Linux (e.g., Ubuntu, Fedora, Kali, CentOS).

  3. Shell: A command-line interface (CLI) for interacting with the OS (e.g., Bash).


Step 2: Installing Linux

Option 1: Install Linux on a Virtual Machine (Recommended for Beginners)

  1. Download a VM software (e.g., VirtualBox or VMware).

    Install Linux on a Virtual Machine
    Install Linux on a Virtual Machine
  2. Download a Linux distribution ISO file (e.g., Ubuntu or Fedora).

  3. Create a virtual machine in your VM software and install Linux.

    Create a virtual machine in your VM software and install Linux
    Create a virtual machine in your VM software and install Linux

Option 2: Dual-Boot or Full Installation

  • Dual-boot Linux alongside Windows/Mac or replace your current OS.

Option 3: Live USB

  • Use a Linux live USB for experimentation without installation.


Step 3: Learn Basic Linux Commands


Open the Terminal:

  • Shortcut: Ctrl + Alt + T (on most distros).

  • Terminal is your gateway to Linux power.

Essential Commands:

pwd- Print the current working directory.


Print the current working directory
Print the current working directory

ls- List files and directories in the current location.


List files and directories in the current location
List files and directories in the current location

cd <dir>:- Change directory to <dir>.

Change directory to
Change directory to

mkdir <dir> - Create a directory named <dir>.

Create a directory named
Create a directory named

touch <file> - Create an empty file named <file>.


Create an empty file named
Create an empty file named

rm <file> - Delete a file.


Delete a file
Delete a file

cp <src> <dest> - Copy a file/directory to another location.


Copy a file/directory to another location
Copy a file/directory to another location


mv <src> <dest> - Move or rename a file/directory.


Move or rename a file/directory.
Move or rename a file/directory.

cat <file>- Display the contents of a file.


Display the contents of a file
Display the contents of a file


man <command> - Show the manual for a command (e.g., man ls).


Show the manual for a command
Show the manual for a command

sudo <command> - Run a command with administrative privileges.


Run a command with administrative privileges
Run a command with administrative privileges


Step 4: Learn the File System Structure


  1. Root (/): The base of the Linux file system.

  2. Home (/home): Stores user files (like C:\Users in Windows).

  3. Bin (/bin): Contains essential command binaries (e.g., ls, cp).

  4. Var (/var): Stores variable data like logs and caches.

  5. Etc (/etc): Contains configuration files.

  6. Tmp (/tmp): Temporary files.


Use tree to view the directory structure (install with sudo apt install tree).


Step 5: Managing Users and Permissions

User Management:


whoami - Show the current user.



adduser <username>- Add a new user



su <username> Switch to another user.



Command

Description

whoami

Show the current user.

adduser <username>

Add a new user.

passwd <username>

Change a user’s password.

su <username>

Switch to another user.

File Permissions:

  1. Understand Permissions:

    • Use ls -l to view file permissions.

    • Example: -rw-r--r--

      • r: Read, w: Write, x: Execute.

      • Divided into Owner, Group, and Others.

  2. Change Permissions:

    • Use chmod to modify permissions.

    • Example: chmod 755 <file> (Owner: full, Group/Others: read/execute).


Step 6: Master File Manipulation and Searching

  1. Search Files:

    • find /path -name <filename>: Find files.

    • grep <pattern> <file>: Search for text in files.

  2. File Archiving and Compression:

    • Create archive: tar -cvf archive.tar files/

    • Extract archive: tar -xvf archive.tar

    • Compress: gzip file

    • Decompress: gunzip file.gz


Step 7: Software Management

  1. Install Software:

    • Ubuntu/Debian: sudo apt install <package>


    • Fedora: sudo dnf install <package>


    • Arch: sudo pacman -S <package>


  2. Update System:

    • sudo apt update (Update package list).

    • sudo apt upgrade (Upgrade installed packages).


Step 8: Networking in Linux


fconfig or ip




ping <host> Test connectivity to a host



 
 
 

Recent Posts

See All

Comments


© 2023 by newittrendzzz.com 

  • Facebook
  • Twitter
  • Instagram
bottom of page