Linux Commands

Piyush AgrawalPiyush Agrawal
2 min read

Certainly! Here are some common Linux commands:

  1. Navigating File System:

    • cd: Change directory

    • ls: List directory contents

    • pwd: Print working directory

  2. File Operations:

    • cp: Copy files or directories

    • mv: Move or rename files or directories

    • rm: Remove/delete files or directories

    • mkdir: Create a new directory

    • touch: Create an empty file or update the access/modification time of a file

  3. Text Processing:

    • cat: Concatenate and display the content of files

    • grep: Search for a pattern in files

    • nano or vi/vim: Text editors

  4. File System Information:

    • df: Display disk space usage

    • du: Display directory space usage

    • lsblk: List block devices

  5. User and Permissions:

    • whoami: Print the current username

    • passwd: Change user password

    • chmod: Change file permissions

    • chown: Change file owner and group

  6. Process Management:

    • ps: Display information about running processes

    • kill: Terminate a process

    • top: Display real-time system statistics

  7. Networking:

    • ifconfig or ip addr: Display network interface information

    • ping: Test network connectivity

    • nslookup or dig: DNS query tools

    • netstat or ss: Display network connections

  8. Package Management:

    • apt (Debian/Ubuntu): Advanced Package Tool

    • yum (Red Hat/CentOS): Yellowdog Updater, Modified

    • dnf (Fedora): Dandified YUM

  9. System Information:

    • uname: Print system information

    • lsb_release: Display distribution-specific information

    • uptime: Display how long the system has been running

  10. Compression and Archiving:

    • tar: Create, view, or extract tar archives

    • gzip or gunzip: Compress or decompress files using gzip

    • zip or unzip: Package and compress files using zip format

These are just a few examples, and there are many more commands available in Linux. You can access the manual pages for any command by using man followed by the command name to get detailed information on its usage and options

0
Subscribe to my newsletter

Read articles from Piyush Agrawal directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Piyush Agrawal
Piyush Agrawal