List of Linux cmd
--
The 🚀 Linux directory structure 🚀 follows a hierarchical tree-like structure, starting from the root directory (“/”) and branching out into various subdirectories.
💎 / (Root Directory):
The root directory is the starting point of the Linux file system hierarchy.
All other directories and files are located either directly or indirectly under the root directory.
💎 /bin (Binary Programs):
Contains essential binary executables (programs) that are available to all users.
Common commands like ls, cp, mv, etc., are located here.
💎 /boot (Bootloader Files):
Contains boot-related files, such as the Linux kernel, initial RAM disk (initrd), and boot loader configurations.
The boot loader is responsible for loading the operating system during the boot process.
💎 /dev (Device Files):
Contains device files that represent various hardware devices on the system.
These files allow access to devices such as hard drives, USB devices, serial ports, etc.
💎 /etc (System Configuration Files):
Contains system-wide configuration files and scripts.
Configuration files for various services, network settings, user information, etc., are stored here.
💎 /home (Home Directories):
Contains personal home directories for each user on the system.
Each user has a subdirectory here with their username, where they can store their personal files and settings.
💎 /lib (Shared Libraries):
Contains shared libraries required by the system and various programs.
These libraries provide common functions and features to multiple applications.
💎 /mnt (Mount Directory):
Used as a temporary mount point for mounting external file systems, such as removable media or network shares.
💎 /opt (Optional Software):
Typically used for installing additional software packages that are not part of the default system installation.
Third-party applications or programs that are not managed by the system’s package manager may be installed here.
💎 /proc (Process Information):
A virtual file system that provides information about running processes and system resources.
Each process has a directory named after its process ID (PID), containing information about the process.
💎 /sbin (System Binaries):
Contains system-related binaries (programs) that are mostly used by system administrators.
Commands necessary for system maintenance or system recovery are located here.
💎 /tmp (Temporary Files):
Used for storing temporary files created by the system and users.
Files in this directory are typically deleted when the system is rebooted.
💎 /usr (User Programs and Data):
Contains user-related programs, libraries, and data files.
It is one of the largest directories and is further divided into subdirectories such as /usr/bin, /usr/lib, /usr/include, etc.
💎 /var (Variable Data):
Contains variable files that change during system operation.
Log files, spool directories, package databases, web server data, and other variable files are stored here.
lists of cmd
- cd — Change directory
- ls — List directory contents
- pwd — Print working directory
- cat — Concatenate and display files
- touch — Create an empty file
- cp — Copy files and directories
- mv — Move or rename files and directories
- rm — Remove files and directories
- mkdir — Create a new directory
- rmdir — Remove an empty directory
- cut — Cut out sections of a file
- gzip — Compress or decompress files using gzip
- gunzip — Decompress files compressed with gzip
- find — Find files and directories matching a pattern
- grep — Search for a pattern in a file
- awk — Pattern scanning and processing language
- sed — Stream editor for filtering and transforming text
- head — Display the first few lines of a file
- tail — Display the last few lines of a file
- sort — Sort lines of a file
- uniq — Remove duplicate lines from a file
- wc — Count lines, words, and characters in a file
- diff — Compare two files line by line
- patch — Apply a patch to a file
- chmod — Change permissions of files and directories
- chown — Change the owner of a file or directory
- chgrp — Change the group ownership of a file or directory
- ps — List running processes
- top — Display system resource usage and process information
- kill — Send a signal to a process to terminate it
- du — Display disk usage of files and directories
- df — Display free disk space on the file system
- mount — Mount a file system
- umount — Unmount a file system
- ping — Test connectivity to a network host
- ssh — Secure shell remote login and command execution
- scp — Secure copy files between hosts
- rsync — Remote file and directory synchronization
- curl — Transfer data from or to a server using various protocols
- wget — Retrieve files from the web using various protocols
- ftp — File Transfer Protocol client
- sftp — Secure File Transfer Protocol client
- telnet — Telnet client
- nslookup — DNS lookup utility
- dig — DNS lookup utility
- netstat — Display network connections and statistics
- ifconfig — Configure network interfaces
- route — Display or modify the routing table
- iptables — Firewall and packet filtering utility
- hostname — Display or set the hostname of the system
- date — Display or set the system date and time
- timedatectl — Control the system date and time
- uname — Display system information
- whoami — Display the current user ID
- id — Display user and group information
- su — Switch user to become another user
- sudo — Execute a command with superuser privileges
- passwd — Change the password of a user account
- useradd — Create a new user account
- userdel — Delete a user account
- usermod — Modify a user account
- groupadd — Create a new group
- groupdel — Delete a group
- groupmod — Modify a group
- finger — Display information about users on the system
- last — Display information about recent logins
- history — Display command history
- echo — Print a message to the terminal
- printf — Format and print data
- lshw — Displays hardware information
- lspci — Displays information about PCI buses and devices.
- lsusb — Displays information about USB buses and devices.
- hwinfo — Displays detailed hardware information.
- free — Displays memory usage.
- vmstat — Displays system memory, processor, and I/O statistics.
- iostat — Displays CPU and disk I/O statistics.
- uptime — Displays system uptime and load averages.
- journalctl — Displays the system journal.
- dmesg — Displays the kernel ring buffer.
- crontab — Schedules recurring tasks.
- at — Schedules a one-time task.
- service — Manages system services.
- systemctl — Controls system services in systemd-based distributions.
- traceroute — Traces the network path to a remote host.
- bzip2 — Compresses files using the bzip2 algorithm.
- unzip — Extracts files from a ZIP archive.
- tee — Redirect output to multiple files
- chroot — Change the root directory for a process
- ps aux — Display information about all running processes
- less — Display file contents in a paginated format
- more — Display file contents one page at a time
- ln — Create links between files
- realpath — Print the resolved absolute path of a file
- watch — Execute a command periodically and display the output
- cal — Display a calendar
- tar -xzvf — Extract files from a compressed archive
- tar -czvf — Create a compressed archive
- whereis — Locate the binary, source, and manual page files for a command
- locate — Find files by name
- which — Display the full path to an executable