Most commonly used shell commands in Unix-like operating systems

Certainly! Here are some of the most commonly used shell commands in Unix-like operating systems:

  1. File and Directory Commands:

    • ls: List directory contents.

    • cd: Change directory.

    • pwd: Print working directory.

    • mkdir: Create a directory.

    • cp: Copy files or directories.

    • mv: Move or rename files or directories.

    • rm: Remove files or directories.

    • touch: Create an empty file.

  2. File Content Commands:

    • cat: Concatenate and display the content of files.

    • more or less: Paginate through file content.

    • head: Display the beginning of a file.

    • tail: Display the end of a file.

    • nano or vim/vi: Text editors for creating or editing files.

  3. File System Commands:

    • df: Display disk space usage.

    • du: Display directory space usage.

    • mount and umount: Mount and unmount file systems.

    • find: Search for files and directories.

    • grep: Search for patterns within files.

    • chmod: Change file permissions.

  4. Process Management:

    • ps: Display information about active processes.

    • top: Display real-time system statistics.

    • kill: Terminate a process.

    • killall: Kill processes by name.

  5. User and Group Management:

    • who: Display who is logged in.

    • w: Display information about logged-in users and their activities.

    • useradd, userdel, usermod: Manage user accounts.

    • groupadd, groupdel, groupmod: Manage groups.

  6. System Information:

    • uname: Display system information.

    • hostname: Display or set the system's hostname.

    • uptime: Display system uptime.

    • free: Display free and used memory.

  7. Networking:

    • ifconfig or ip: Display or configure network interfaces.

    • ping: Check network connectivity.

    • traceroute or tracepath: Trace the route to a host.

    • netstat: Display network statistics.

  8. Archiving and Compression:

    • tar: Create or extract tar archives.

    • gzip, gunzip: Compress or decompress files using gzip.

    • zip, unzip: Create or extract zip archives.

  9. System Shutdown and Reboot:

    • shutdown: Shut down the system.

    • reboot: Restart the system.

  10. Shell Operations:

    • echo: Display a message.

    • history: Display command history.

    • alias: Create command aliases.

    • source or .: Execute commands from a file.

These commands provide a foundation for interacting with the Unix shell and performing various tasks in a Unix-like environment. Keep in mind that the availability and behavior of commands may vary slightly between different Unix distributions.

Did you find this article valuable?

Support Nikhil Soman Sahu by becoming a sponsor. Any amount is appreciated!