Chapter 2 1 min read
Save

Linux Command Line

Linux Administration · BCA · Updated Apr 23, 2026

Table of Contents

Linux Command Line

The CLI is the primary way to interact with Linux servers. Mastering it is essential for system administration and automation.

Basic Commands

Navigation: pwd, cd, ls (-l, -a). File ops: cp, mv, rm (-r), mkdir, touch. Viewing: cat, less, head, tail (-f for live).

File Permissions

Owner/group/others with read/write/execute. chmod (755 or u+x), chown, chgrp. SUID, SGID, sticky bit for special permissions. Critical for security.

Text Processing

grep (search patterns), sed (stream editor), awk (structured text), sort, uniq, wc, cut, tr. Combine powerfully through pipes.

Pipes and Redirection

Pipes (|) chain commands: cat file | grep error | wc -l. Redirection: > (overwrite), >> (append), < (input), 2> (stderr). Unix philosophy: small tools combined.

Process Management

ps (list), top/htop (real-time), kill (signals), & (background), nohup (persist after logout), systemctl (services).

Shell Scripting

Bash scripts automate commands. #!/bin/bash shebang. Variables, conditionals (if/fi), loops (for/do/done), functions, command substitution ($(cmd)). Powerful automation.

Summary

The Linux CLI is essential for administration. File operations, permissions, text processing, pipes, process management, and scripting enable efficient system management.

Related Notes

Discussion

0 comments

Join the discussion

Log in to share your thoughts and help fellow students.

Log in to comment

No comments yet. Be the first to share your thoughts!