Live URL: https://aminbiography.github.io/linux/
pwd
Prints the current working directory.</p>
pwd
cd
Changes the current directory to ls Lists the files and directories in the current directory. Use ls -l for detailed information and ls -a to include hidden files. cd ~ Moves to the user's home directory. mkdir Creates a new directory. touch Creates a new empty file or updates the timestamp of an existing file. cp Copies files or directories. Use -r to copy directories recursively. mv Moves or renames files and directories. rm Removes a file. Use -r for directories and -f to force remove without prompt. cat Displays the contents of a file. less Allows you to view the contents of a file one screen at a time. head Displays the first 10 lines of a file (use -n to specify a different number). tail Displays the last 10 lines of a file (use -n for a different number). grep Searches for a pattern inside a file. chmod Changes the permissions of a file or directory. Use r, w, x for read, write, and execute. chown Changes the owner and/or group of a file or directory. ps Displays the current processes running on the system. top Displays system processes and resource usage in real-time. kill Terminates a process by its process ID (PID). killall Terminates all processes with the given name. bg Resumes a paused job in the background. fg Brings a background job to the foreground. df Displays disk space usage of file systems. du Shows disk usage for files and directories. ping Pings a host (IP or domain) to check network connectivity. ifconfig or ip a Displays network interfaces and their configurations. netstat Displays network connections, routing tables, interface statistics, and more. apt-get (Debian-based) Used for package installation, removal, and updates (e.g., on Ubuntu). yum (Red Hat-based) Used for package management in Red Hat-based distributions like CentOS. dnf (Fedora-based) A newer package manager for Fedora and CentOS. find Searches for files within a directory hierarchy. locate Searches for files using a prebuilt index (faster than find). tar Archives files. Use -czf to create a compressed archive and -xzf to extract. gzip Compresses files using the gzip algorithm. unzip Extracts files from a .zip archive. useradd Adds a new user. passwd Changes the password for a user. whoami Displays the current logged-in user. uname -a Displays detailed information about the system kernel. uptime Shows how long the system has been running, along with the load averages. free Displays memory usage. man Displays the manual page for a command. --help Provides a brief help message for a command. export Sets environment variables for the current session. This is useful for configuring paths and settings. echo $ Displays the value of an environment variable. dmesg Displays system messages and logs, often used for troubleshooting hardware and kernel-related issues. journalctl Views logs collected by systemd (on systems using systemd). Use -xe for more detailed, real-time logs.02: Managing Files and Directories
03: Viewing and Manipulating Files
04: File Permissions
05: Process Management
06: Disk Usage
07: Networking
08: Package Management
09: Searching for Files
10: Archiving and Compression
11: User Management
12: System Information
13: Help and Manual Pages
14: Environment Variables
15: Viewing and Monitoring System Logs