Keegan Turner
  • πŸ‘‹Hello World.
  • πŸ“šHow-To Guides
    • Integrating Git on your local host
    • βš–οΈLoad Balancing with HAProxy
    • πŸ‘¨β€πŸ’»Code Server - Self Hosted VSCode alternative
    • πŸ•ΈοΈWordPress + LAMP - Self Hosted CMS
    • ☁️Nextcloud - Self Hosted file sync & sharing solution
    • ⏳Grafana Cloud - Cloud Hosted Monitoring
    • βŒ›Prometheus + Grafana - Self Hosted monitoring stack solution
    • πŸ›³οΈPortainer + Docker - Self Hosted container management UI
    • 🐬MariaDB - Self Hosted database server
    • πŸ€–Let's Encrypt + Certbot - Secure your web services with SSL certificates
    • ◀️Nginx Proxy Manager - Self Hosted domain controller with LE SSL certificates
    • πŸ–₯️LXD - Linux OS containers
    • 🐧Linux basics: commands
    • 🐧Linux basics: file paths
    • 🐧Linux basics: SWAP file
  • 🚫Bytes of Caution
Powered by GitBook
On this page
  1. How-To Guides

Linux basics: commands

2024-02-11

Linux is an open-source operating system kernel used as the foundation for a wide range of operating systems, known as Linux distributions. It provides a robust and customizable environment for computing, suitable for diverse applications, from servers to personal devices. Linux supports multitasking, multiuser capabilities, and a secure, permission-based file system. It is widely employed in server environments due to its stability, security features, and efficiency. As a versatile and freely accessible operating system, Linux plays a crucial role in empowering developers, system administrators, and organizations to build and manage computing infrastructure.

Commands

System Information

  1. ls - List directory contents.

  2. pwd - Print name of current/working directory.

  3. cd - Change directory.

  4. man - Display manual pages for commands.

  5. uname - Print system information.

File Operations

  1. cp - Copy files and directories.

  2. mv - Move/rename files and directories.

  3. rm - Remove/delete files or directories.

  4. mkdir - Create directories.

  5. rmdir - Remove empty directories.

Text Processing

  1. cat - Concatenate and display files.

  2. grep - Search for patterns in files.

  3. sed - Stream editor for filtering and transforming text.

  4. awk - Pattern scanning and text processing language.

File Viewing and Editing

  1. less - View file contents interactively.

  2. head - Output the first part of files.

  3. tail - Output the last part of files.

  4. nano - Terminal text editor.

  5. vim - Powerful text editor.

Process Management

  1. ps - Report a snapshot of the current processes.

  2. top - Display and update sorted information about processes.

  3. kill - Send signals to processes.

System Control

  1. shutdown - Shutdown or restart the system.

  2. reboot - Reboot the system.

  3. halt - Halt the system.

Package Management

  1. apt-get (or apt on newer systems) - Command-line tool for handling packages.

  2. dpkg - Debian package manager.

  3. yum - Package manager for RPM-based Linux distributions.

Network

  1. ping - Send ICMP ECHO_REQUEST to network hosts.

  2. ifconfig - Configure network interfaces.

  3. ssh - OpenSSH SSH client (remote login program).

  4. scp - Secure copy (remote file copy program).

User Management

  1. useradd - Create a new user or update default new user information.

  2. userdel - Delete a user account and related files.

  3. passwd - Update a user's authentication tokens.

Compression and Archiving

  1. tar - Tape archive utility.

  2. gzip - Compress or decompress files.

  3. zip - Package and compress (archive) files.

Disk Usage

  1. df - Report file system disk space usage.

  2. du - Estimate file space usage.

Permissions

  1. chmod - Change file mode bits (permissions).

  2. chown - Change file owner and group.

Miscellaneous Utilities

  1. date - Display or set the system date and time.

  2. echo - Display a line of text/string.

  3. wc - Print newline, word, and byte counts for each file.

  4. find - Search for files in a directory hierarchy.

Environment

  1. export - Set environment variables.

  2. source - Execute commands from a file in the current shell.

  3. alias - Create or list command aliases.

  4. history - Command history list.

Each of these commands plays a crucial role in Linux system administration and daily usage, covering a wide range of tasks from basic file manipulation to system control and network management.

PreviousLXD - Linux OS containersNextLinux basics: file paths

Last updated 1 year ago

πŸ“š
🐧
Page cover image