TalkDevops.com

TalkDevops.comTalkDevops.comTalkDevops.com
Home
About Us
Trainings
  • Introduction
  • CI and CD
  • Git
  • Linux
  • Docker
  • Kubernetes
  • Azure
  • AWS
  • Terraform
  • MLOps
Blogs
Projects
Webinars
Contact Us

TalkDevops.com

TalkDevops.comTalkDevops.comTalkDevops.com
Home
About Us
Trainings
  • Introduction
  • CI and CD
  • Git
  • Linux
  • Docker
  • Kubernetes
  • Azure
  • AWS
  • Terraform
  • MLOps
Blogs
Projects
Webinars
Contact Us
More
  • Home
  • About Us
  • Trainings
    • Introduction
    • CI and CD
    • Git
    • Linux
    • Docker
    • Kubernetes
    • Azure
    • AWS
    • Terraform
    • MLOps
  • Blogs
  • Projects
  • Webinars
  • Contact Us

  • Home
  • About Us
  • Trainings
    • Introduction
    • CI and CD
    • Git
    • Linux
    • Docker
    • Kubernetes
    • Azure
    • AWS
    • Terraform
    • MLOps
  • Blogs
  • Projects
  • Webinars
  • Contact Us

HISTORY OF LINUX

Linux is based on UNIX operating system developed in the 1970s at AT&T Bell Labs and designed to be a free and open-source, making it accessible to everyone which is built on a Linux kernel. Think of the Linux Kernel as the core or 'brain' of the system—it controls how the computer communicates with its hardware and manages resources to keep everything running smoothly. However, the kernel by itself doesn't make a full operating system; it needs additional components and tools to provide a complete user experience.


To create a complete and functional operating system, the Linux Kernel is bundled with a variety of software packages and utilities. Together, these form what are known as Linux distributions. These distributions equip the Linux Operating System with everything users need to run applications and carry out tasks efficiently and securely. Each distribution offers a unique experience, tailored to different user needs and preferences—ranging from beginners to advanced developers.

Linux Installation

Installing Linux is fairly simple and straight forward. There are wide varieties of Linux distributions in the market among them the popular ones are Ubuntu, Fedora, SUSE etc. Navigate to the distribution's official website and download the ISO file based on your system type x64 or x86, most of the system type are 64-bit system. Once downloaded, you can create a bootable USB drive using tools like Rufus or UNetbootin, and then follow the installation instructions provided by the distribution to set up Linux on your machine.


There are also multiple options to download and install the Linux distributions using with Virtualization tool such as Hypervisor or Windows subsystems for Linux to run parallelly with your Windows OS. You can also use dual booting with Windows operating system which requires disk partitioning to allocate space of your new Linux OS. Port number 22 is the SSH protocol to remotely connect to Linux operating system. Putty, OpenSSH, WinSCP are the familiar terminal tools allows you to connect to Linux system. Use root@IP_address to login from terminal. 

Linux Cheat Sheet

File and Directory Management

  • ls – List directory contents
  • cd – Change directory
  • pwd – Print working directory
  • cp – Copy files and directories
  • mv – Move or rename files and directories
  • rm – Remove files or directories
  • mkdir – Make directories
  • rmdir – Remove empty directories
  • touch – Change file timestamps or create empty files
  • find – Search for files in a directory hierarchy
  • locate – Find files by name
  • tree – Display directories in a tree-like format
  • chmod – Change file permissions
  • chown – Change file owner and group
  • chgrp – Change group ownership
  • stat – Display file or file system status

File Viewing and Editing

  • cat – Concatenate and display file content 
  • tac – Concatenate and display file content in reverse 
  • more – View file content interactively (page by page) 
  • less – View file content interactively (scrollable) 
  • head – Output the first part of a file 
  • tail – Output the last part of a file 
  • nano – Text editor (terminal-based) 
  • vim / vi – Advanced text editors 
  • emacs – Text editor 
  • grep – Search text using patterns 
  • sed – Stream editor for filtering and transforming text 
  • awk – Pattern scanning and processing language 
  • cut – Remove sections from each line of files 
  • sort – Sort lines of text files
  • uniq – Report or omit repeated lines

Process Management

  • ps – Report a snapshot of current processes 
  • top – Display Linux tasks 
  • htop – Interactive process viewer (advanced top) 
  • kill – Send a signal to a process, typically to terminate 
  • killall – Terminate processes by name 
  • bg – Resume a suspended job in the background 
  • fg – Bring a job to the foreground 
  • jobs – List active jobs 
  • nice – Run a program with modified scheduling priority 
  • renice – Alter priority of running processes 
  • uptime – Show how long the system has been running 
  • time – Measure program running time

Disk Management

  • df – Report file system disk space usage 
  • du – Estimate file space usage 
  • fdisk – Partition table manipulator for Linux 
  • lsblk – List information about block devices 
  • mount – Mount a file system 
  • umount – Unmount a file system 
  • parted – A partition manipulation program 
  • mkfs – Create a file system 
  • fsck – File system consistency check and repair 
  • blkid – Locate/print block device attributes 

Networking

  • ifconfig – Configure network interfaces 
  • ip – Show/manipulate routing, devices, and tunnels 
  • ping – Send ICMP Echo requests to network hosts 
  • netstat – Network statistics 
  • ss – Socket statistics (faster than netstat) 
  • traceroute – Trace the route packets take to a network host 
  • nslookup – Query Internet name servers interactively 
  • dig – DNS lookup utility 
  • wget – Non-interactive network downloader 
  • curl – Transfer data with URLs 
  • scp – Secure copy files between hosts 
  • ssh – Secure shell for remote login 
  • ftp – File Transfer Protocol client 

User and Group Management

  • useradd – Add a user to the system 
  • usermod – Modify a user account 
  • userdel – Delete a user account 
  • groupadd – Add a group to the system 
  • groupdel – Delete a group 
  • passwd – Change user password 
  • chage – Change user password expiry information 
  • whoami – Print the current logged-in user 
  • who – Show who is logged in 
  • w – Show who is logged in and what they’re doing 
  • id – Display user and group information 
  • groups – Show user’s groups 

System Information and Monitoring

  • uname – Print system information 
  • hostname – Show or set the system’s hostname 
  • uptime – How long the system has been running 
  • dmesg – Boot and system messages 
  • free – Display memory usage 
  • top – Display Linux tasks 
  • vmstat – Report virtual memory statistics
  • lscpu – Display information about the CPU architecture 
  • lsusb – List USB devices 
  • lspci – List PCI devices 
  • lshw – List hardware configuration 

Archiving and Compression

  •  tar – Archive files

                   tar -czf archive.tar.gz /path/to/directory – Compress files using gzip

                   tar -xzf archive.tar.gz – Extract gzipped tarball

                   tar -cf archive.tar /path/to/directory – Create a tarball

                   tar -xf archive.tar – Extract tarball

  • zip – Package and compress files into a ZIP archive
  • unzip – Extract files from a ZIP archive
  • gzip – Compress files using the gzip algorithm
  • gunzip – Decompress files compressed with gzip
  • bzip2 – Compress files using the bzip2 algorithm
  • bunzip2 – Decompress files compressed with bzip2
  • xz – Compress files using the xz algorithm
  • unxz – Decompress files compressed with xz

Package Management (Depends on Distribution)

  • Debian-based (e.g., Ubuntu)

                  apt-get – APT package handling utility

                         apt-get install <package> – Install a package

                         apt-get update – Update package list

                         apt-get upgrade – Upgrade installed packages

                         apt-get remove <package> – Remove a package

                  apt-cache – Query APT cache

                         apt-cache search <package> – Search for a package

                         apt-cache show <package> – Show package details

  • Red Hat-based (e.g., CentOS, Fedora)

                  yum – Package manager for RPM-based systems

                        yum install <package> – Install a package

                        yum update – Update installed packages

                        yum remove <package> – Remove a package

                  dnf – Next-generation package manager (Fedora, CentOS 8+)

                        dnf install <package> – Install a package

                        dnf update – Update installed packages

                        dnf remove <package> – Remove a package

  • General Commands

                  rpm – RPM package manager

                        rpm -i <package.rpm> – Install an RPM package

                        rpm -e <package> – Remove an RPM package

                 dpkg – Debian package manager

                       dpkg -i <package.deb> – Install a Debian package

                       dpkg -r <package> – Remove a Debian package

System Services and Daemon Management

  • systemctl – Control the systemd system and service manager

                  systemctl start <service> – Start a service

                  systemctl stop <service> – Stop a service

                  systemctl restart <service> – Restart a service

                  systemctl enable <service> – Enable a service to start on boot

                  systemctl disable <service> – Disable a service from starting on boot

                  systemctl status <service> – Check service status

  • service – Older service management command (used in non-systemd systems)

                  service <service> start – Start a service

                  service <service> stop – Stop a service

                  service <service> restart – Restart a service

                  service <service> status – Check service status

Scheduling Tasks

  • cron – Daemon for running scheduled commands

                  crontab -e – Edit cron jobs for the current user

                  crontab -l – List the current user’s cron jobs

                  crontab -r – Remove the current user's cron jobs

  • at – Run commands at a specified time

                  at 09:00 – Schedule a command to run at 09:00 AM

  • batch – Run commands when the system load is low
  • sleep – Delay for a specified time

                  sleep 5s – Sleep for 5 seconds

File Permissions and Security

  • chmod – Change file permissions 
  • chown – Change file owner and group 
  • chgrp – Change the group ownership of a file 
  • umask – Set default permissions for new files 
  • setfacl – Set file access control lists (ACL) 
  • getfacl – Get file access control lists (ACL) 
  • sudo – Execute a command as another user (usually root) 
  • visudo – Edit the sudoers file safely 
  • passwd – Change a user’s password 
  • sudoers – Manage sudo access for users 
  • gpasswd – Administer group password 
  • ss – Display socket statistics (for secure network connections) 

Video

 Sessions to be added

Talk DevOps

Copyright © 2025 Talk DevOps - All Rights Reserved.

Powered by

This website uses cookies.

We use cookies to analyze website traffic and optimize your website experience. By accepting our use of cookies, your data will be aggregated with all other user data.

Accept