토. 8월 2nd, 2025

Whether you’re a developer, sysadmin, or Linux beginner, these 50 fundamental commands form the backbone of efficient terminal usage. Each entry includes practical examples and clear explanations.


🗂️ File & Directory Operations

  1. pwd (Print Working Directory)
    Shows your current directory path.
    Example: pwd/home/user/documents

  2. ls (List)
    Displays directory contents. Use -l for details or -a for hidden files.
    Example: ls -la /var/log

  3. cd (Change Directory)
    Navigates between folders. cd ~ returns to home; cd .. moves up.
    Example: cd ./projects/python

  4. mkdir (Make Directory)
    Creates new directories. Add -p to build nested paths.
    Example: mkdir -p backup/2024/january

  5. touch
    Creates empty files or updates timestamps.
    Example: touch report.txt

  6. cp (Copy)
    Copies files/directories. Use -r for folders.
    Example: cp -r config/ ~/backup/

  7. mv (Move)
    Moves/renames files.
    Example: mv oldname.txt newname.txt

  8. rm (Remove)
    Deletes files. Caution: Irreversible! Add -r for directories.
    Example: rm -r obsolete_folder/

  9. find
    Searches for files by name, size, or type.
    Example: find /home -name "*.jpg"


📄 File Viewing & Editing

  1. cat (Concatenate)
    Displays file contents. Combine with > to create files.
    Example: cat notes.txt

  2. less / more
    Views large files page-by-page.
    Example: less /var/log/syslog

  3. head / tail
    Shows first/last lines of a file. tail -f tracks live updates.
    Example: tail -f error.log

  4. nano / vim
    Terminal text editors. Nano is beginner-friendly; Vim offers advanced features.
    Example: namo config.cfg


🔍 Searching & Filtering

  1. grep
    Finds text patterns in files. Use -i for case-insensitive search.
    Example: grep -i "error" system.log

  2. awk
    Processes text/data (e.g., extract columns).
    Example: awk '{print $1}' data.csv

  3. sed
    Stream editor for find/replace operations.
    Example: sed 's/old/new/g' file.txt

  4. sort
    Sorts lines alphabetically/numerically.
    Example: sort users.txt

  5. uniq
    Removes duplicate lines (use with sort).
    Example: sort log.txt | uniq


💻 System Monitoring

  1. top / htop
    Real-time system resource viewer (CPU, memory, processes).

  2. df (Disk Free)
    Shows disk space usage. Add -h for human-readable format.
    Example: df -h

  3. du (Disk Usage)
    Reports file/directory space consumption.
    Example: du -sh ~/downloads/

  4. free
    Displays RAM usage.
    Example: free -m (output in MB)

  5. uname
    Prints system kernel info.
    Example: uname -a


⚙️ Process Management

  1. ps (Process Status)
    Lists running processes. ps aux shows all.
  2. kill
    Terminates processes by PID. kill -9 forces termination.
    Example: kill 4512
  3. bg / fg
    Moves jobs to background/foreground.
  4. jobs
    Displays background jobs.

🔐 Permissions & Ownership

  1. chmod
    Changes file permissions (read/write/execute).
    Example: chmod +x script.sh (makes it executable)
  2. chown
    Changes file owner.
    Example: chown user:group file.txt
  3. sudo (SuperUser Do)
    Executes commands with admin privileges.

🌐 Networking

  1. ping
    Tests network connectivity to a host.
    Example: ping google.com
  2. curl / wget
    Downloads files from URLs.
    Example: wget https://example.com/file.zip
  3. ssh (Secure Shell)
    Connects to remote servers securely.
    Example: ssh user@192.168.1.5
  4. scp (Secure Copy)
    Transfers files over SSH.
    Example: scp file.txt user@remote:/path/
  5. ifconfig / ip
    Configures network interfaces (use ip addr for modern systems).

📦 Compression & Archives

  1. tar
    Creates/extracts .tar archives.
    Example: tar -czvf archive.tar.gz /folder
  2. gzip / gunzip
    Compresses/decompresses .gz files.
  3. zip / unzip
    Handles ZIP archives.

🛠️ Utilities

  1. echo
    Prints text/variables.
    Example: echo $PATH
  2. date
    Shows/sets system date/time.
  3. history
    Lists previously executed commands.
  4. alias
    Creates command shortcuts.
    Example: alias ll='ls -al'
  5. man (Manual)
    Displays command documentation.
    Example: man grep
  6. whatis
    Summarizes a command’s purpose.
  7. which
    Locates a command’s executable path.
    Example: which python
  8. shutdown / reboot
    Powers off or restarts the system.

👥 User Management

  1. passwd
    Changes user passwords.
  2. useradd / usermod
    Creates/modifies user accounts.
  3. su (Switch User)
    Changes user context.
    Example: su - root
  4. id
    Shows user/group IDs.

Pro Tips for Beginners:

  • Chain commands with | (pipe): cat log.txt | grep "ERROR"
  • Redirect output with > (overwrite) or >> (append).
  • Press Tab to auto-complete paths/commands.
  • Use Ctrl+C to stop any running command.

Master these, and you’ll navigate Linux like a pro! 🐧💻

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다