Master Essential Linux Shell Commands: A Complete Guide
This comprehensive guide introduces Linux shell fundamentals, compares popular shells such as Bourne, Csh, Korn, and Bash, and provides detailed usage of over thirty essential commands for file management, process control, networking, and scripting, helping users become proficient with the command line.
Linux shell is a command interpreter that provides an interface between the user and the operating system, operating in a text‑based environment unlike graphical X Window.
Common Shells
Bourne shell (sh) : the default Unix shell, powerful for scripting but lacks interactive features.
C shell (csh) : adds interactive features like command completion and history; tcsh is its enhanced version.
Korn shell (ksh) : combines features of Bourne and C shells; pdksh is an enhanced variant.
Bash (bash) : the default shell on most Linux systems, compatible with Bourne shell and adds many improvements such as command completion, wildcard support, history, and aliases.
Typical Bash Features
Command line completion using Tab.
Wildcard patterns * and ? for flexible matching.
Command history stored in .bash_history, configurable via HISTSIZE.
Aliases defined with alias and removed with unalias.
Common Commands
Account and password : passwd Online help : man <command> Remote login : rlogin, telnet File and directory handling :
List files: ls with options -a, -t, -F, -l, -R Change directory: cd <path> Copy files/directories: cp (use -r for directories)
Move/rename: mv Create/remove directories: mkdir, rmdir, rm -r Delete files: rm with patterns ?, * File permissions : chmod (numeric or symbolic modes)
Ownership : chown, chgrp File timestamps : touch Links : ln, ln -s Search : grep, whereis, which, whatis, find Comparison : diff (use -r for directories)
Compression : compress, uncompress Pipelines : command1 | command2 Input/Output redirection : < file, > file, >> file, >& file Process control :
List processes: ps (options -aux, -x)
Terminate: kill (use -9 for force)
Background execution: command & Job control: jobs, kill %n Shell variables : view with set, access with echo $VAR, set with set VAR=value, unset with unset VAR Aliases : define with alias name='command', list with alias, remove with unalias History : configure length with set history=n, view with history, repeat with !!, !n, !string, or edit with ^old^new Network utilities : ping, talk Email : mail for sending messages, /usr/magedu/sendmail -bp to check queue
User and System Information
Current users: who, finger, w Switch user: su <user> Show current username: who am i, whoami List all logged‑in users on the network:
rusersSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
