10 Essential Linux Commands to Turn a Beginner into a Pro
This article introduces ten core Linux terminal commands—covering user management, file listing, navigation, file creation, deletion, and I/O redirection—explaining each command’s purpose, common options, and practical examples so newcomers can quickly become proficient.
Open vs. closed source OS
Open‑source operating systems can be examined by many people, so bugs are discovered and fixed more quickly, resulting in more stable, secure, and efficient releases. Closed‑source systems may have slower bug discovery and lower‑quality fixes.
Basic user management commands
adduser user_name # add a new user named user_namepasswd user_name # set login password for user_nameuserdel user_name # delete the user named user_namels command
Purpose: list directory contents or file information.
ls -l # detailed file informationls -a # include hidden files (those starting with .)ls -d # display directory entries themselves, not their contentsls -i # show inode numberls -k # display size in kilobytesls -n # show numeric UID/GID instead of namesls -F # append a character to indicate file type (* executable, / directory, @ symlink, | FIFO, = socket)ls -r # reverse sort orderls -t # sort by modification timels -s # show size after the filenamels -R # recursively list sub‑directoriesls -1 # one entry per lineFile concept
A file consists of content plus attributes (metadata). Operations therefore target either the data or the metadata.
pwd command
Displays the current working directory.
cd command
Change directory: cd directory_name. Special shortcuts: ~ returns to the home directory, - returns to the previous directory.
File attribute basics
Attributes indicate type: a leading - denotes a regular file, d denotes a directory. Permissions are split into three groups—owner, group, and others—each with read ( r), write ( w), and execute ( x) bits.
mkdir command
Create a directory: mkdir directory_name.
rm command
Delete files or directories.
rm -f # force deletionrm -r # recursively delete directoriestouch command
Update a file’s access and modification timestamps, or create an empty file if it does not exist.
touch file_namestat command
Display detailed file attributes (size, timestamps, permissions, etc.).
tree command
Show a visual directory tree.
tree pathman command
Show the manual page for a command.
man command_namewhich command
Locate the executable file associated with a command.
which command_namealias command
Create an alias (shortcut) for another command.
I/O redirection
Input redirection: < file feeds a file’s contents to a command.
Output redirection: > file writes command output to a file, overwriting existing content.
Append redirection: >> file appends command output to the end of a file.
Linux “everything is a file” principle
In Linux, virtually all resources—devices, sockets, pipes—are represented as files, allowing uniform handling of I/O.
Signed-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.
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.
