Parts of the command line

The linux command line is not one singular thing, it consists of many parts. Each having a specific important purpose. Each of these parts is modular and can be swapped out to fit your needs.

The Terminal:

The terminal (often called terminal emulator), is a front end interface that allows you to interact with the shell of the system. At its core its just a window in which you input text which gets passed down to the shell and then displays the output of the shell. The terminal emulator does not understand commands, it just passes input to the shell and renders output. Common terminal emulators include: Konsole, Kitty, Gnome Terminal, and Ghostty.

The Shell:

The shell is a program that interprets commands and then runs the right programs. It is like the bridge between the user and the kernel. its the most basic form of interacting with your system. The most commonly used shell programs are: Bash, Zsh, Powershell.

The Binaries:

The shell itself doesnt execute anything, it just interprets a command and then executes the correct binary programs with the correct arguments. Each command is just calling one or more of those binary programs. So the commands like: cd, ls, cat. Are basically just names of executable binaries. All major Linux distro’s come with a standard set of these commands (binaries). Most of these binaries are part one of the following projects: gnu-coreutils, util-linux, procps-ng, iproute2, iputils. and then there are a number of binaries that are their own projects. But you can be sure that all major Linux distros come with the binaries of those 5 projects, so if you learn those you are set.

Commonly used commands

CommandProjectDescription
lsgnuList files and directories
cdbashChange the current directory
pwdgnuPrint current working directory
cpgnuCopy files or directories
mvgnuMove or rename files/directories
rmgnuRemove files or directories
mkdirgnuCreate directories
rmdirgnuRemove empty directories
touchgnuCreate empty file or update timestamp
catgnuDisplay or concatenate file contents
echobashPrint text to stdout
chmodgnuChange file permissions
chowngnuChange file owner and group
findgnuSearch for files in directories
grepgnuSearch text in files using patterns
psprocps-ngShow currently running processes
killgnuTerminate a process by PID
unamegnuShow system and kernel information
uptimeprocps-ngShow system uptime and load
whoutil-linuxShow who is logged in
whoamignuShow current user
idgnuShow user and group IDs
groupsgnuList groups for a user
targnuArchive or extract files
gzipgnuCompress files
gunzipgnuDecompress gzip files
pingiputilsTest network connectivity
ipiproute2Show or configure network interfaces
whichotherLocate a command in PATH
whereisutil-linuxLocate binaries, source, and manuals
typebashShow command type information
basenamegnuStrip directory path from filename
dirnamegnuStrip filename to show directory path
xargsgnuBuild and execute commands from input
envgnuShow or set environment variables
exportgnuSet environment variables for child processes
mountutil-linuxMount disks or drive
unmountutil-linuxUnmount disks or drive
fdiskutil-linuxManages disks or drives
curlotherDownloads files from the web
wgetotherDownloads files from the web
suutil-linuxSwitch to root user
sudootherExecute command as root user
shutdownutil-linuxShut down the system
rebootutil-linuxReboot the system
cleargnuClears the terminal output

Basics of bash and scripting

comming soon…

Posix and compatibility

comming soon…