Language
日本語
English

Caution

JavaScript is disabled in your browser.
This site uses JavaScript for features such as search.
For the best experience, please enable JavaScript before browsing this site.

  1. Home
  2. Linux & Mac & Bash Command Dictionary

Linux & Mac & Bash Command Dictionary Index

Beginners Guide: Overview, Features, and Learning PathAn overview of Bash, its features, and how execution works, along with a recommended learning path through the dictionary.
Comments (#)Comment syntax in #, when to write comments, and when not to.
[Setup] Bash EnvironmentSteps to set up an environment for creating and running Bash scripts.
Creating and Running .sh FilesHow to write and run .sh files.
lsDisplaying a list of files.
cd / pwdNavigating directories and checking the current location.
cp / mv / rmCopying, moving, and deleting files and directories.
mkdir / rmdir / touchCreating directories and files.
findSearching for files.
lnCreating symbolic links and hard links.
chmod / chown / chgrpChanging permissions and ownership.
stat / file / du / dfChecking file information and disk usage.
cat / tacDisplaying file contents in order and in reverse.
less / moreBrowsing a file with paging.
head / tailDisplaying the beginning or end of a file.
echo / printfOutputting strings.
wc / sort / uniqCounting lines and words, sorting, and removing duplicates.
grepSearching text for patterns.
sedLine-based text substitution and editing.
awkField processing and aggregation of text.
cut / paste / joinCutting, pasting, and joining fields.
tr / col / expandConverting and formatting characters.
diff / patchComparing file differences and applying patches.
| (Pipe)Passing the output of one command to the next.
&&(AND) / ||(OR) / !(NOT) / ;(Sequential) / &(Background)Chaining commands with conditional execution.
> (Output Redirect)Redirecting stdout and stderr.
< (Input Redirect) / HeredocRedirecting stdin and using here documents.
teeWriting to a file in the middle of a pipe.
xargsRunning commands from a list of arguments.
Defining and Referencing VariablesDeclaring, assigning, and referencing shell variables.
export / env / printenvSetting and checking environment variables.
${Parameter Expansion}Advanced variable expansion and default value settings.
Special VariablesSpecial shell variables used in scripts.
$((Arithmetic Expansion))Integer arithmetic.
{} (Brace Expansion)Generating sequences and strings.
$() (Command Substitution)Using command output as a value.
if / elif / elseConditional branching.
test / [ ] / [[ ]]Evaluating conditional expressions.
caseMulti-way branching by value.
forLooping over a list or range.
while / untilConditional loops.
selectGenerating an interactive menu.
Defining and Calling FunctionsBasics of shell functions.
Function Arguments and Return ValuesReceiving arguments and returning values.
readReading from standard input.
Shebang / chmod +xCreating and executing script files.
source / . (Dot)Loading another script file.
set (Shell Options)Configuring and unsetting shell behavior options.
alias / unaliasSetting and removing command aliases.
crontabScheduling recurring tasks.
sudo / suPrivilege escalation commands.
historyManaging command history.
/etc/hosts (Manual Host Resolution)Syntax of /etc/hosts and using it to resolve hostnames before querying DNS.
which / type / commandFinding command locations and types.
sleep / seqWaiting and generating sequences.
ArrayWorking with arrays in Bash.
String Manipulation (Parameter Expansion)String manipulation using parameter expansion.
getoptsParsing script options.
eval / execDynamic execution and process replacement.
systemctl / serviceManaging system services.
umaskDefault permissions for new files.
ps / top / htopChecking running processes.
kill / pkill / killallStopping processes and sending signals.
& (Background Execution)Running in the background and managing jobs.
wait / trapWaiting for processes and catching signals.
curlSending and receiving HTTP requests.
wgetDownloading files.
ssh / scp / rsyncConnecting to remote hosts and transferring files.
ping / nslookup / digNetwork diagnostics and name resolution.
tarCreating and extracting archives.
gzip / bzip2 / zip / unzipCompressing and extracting files.
date / calGetting and manipulating dates and times.
Bash vs zsh DifferencesSummary of key differences including arrays, globs, and prompts.
ACL (Access Control List)A mechanism that supplements Unix permissions by granting individual access rights to specific users or groups; use setfacl to configure and getfacl to inspect.
Apache HTTP Server Overview and ConfigurationA widely used open-source web server that organizes configuration per module and virtual host, with optional per-directory overrides via .htaccess.
AppArmorA Mandatory Access Control framework built into Ubuntu and Debian. Profiles restrict each process's access to files, network resources, and system calls.
aptThe standard package management tool for Debian and Ubuntu. Use update to refresh the package list, then install, upgrade, and remove to manage software.
auditdA daemon that works with the Linux kernel audit subsystem to log file access, command execution, and user operations. Use auditctl to configure rules and ausearch or aureport to analyze the collected data.
chmod / chown / chgrpCommands for changing file permissions, owning user, and owning group. Essential for correctly configuring permissions when deploying web applications.
/etc/cron.d and anacronSystem cron directories such as /etc/cron.d and /etc/cron.daily, plus anacron which runs missed jobs after the system powers back on.
Deploying Django Apps (Gunicorn + Nginx)Steps for deploying Django to production: isolate the environment with virtualenv, register Gunicorn as a systemd WSGI server, and place Nginx in front as a reverse proxy.
Deploying C# / .NET Apps (Kestrel + Nginx)Production deployment for .NET apps: publish with dotnet publish, register Kestrel as a systemd service, and place Nginx in front as a reverse proxy.
Deploying Node.js / Express Apps (PM2 + Nginx)Deploy Node.js/Express to production using PM2 as a process manager for daemonization and auto-restart, with Nginx in front as a reverse proxy.
Deploying Go Apps (Single Binary + Nginx)Go compiles to a single binary requiring no runtime installation. Transfer the binary to the server, register it as a systemd service, and configure Nginx as a reverse proxy.
Deploying PHP Apps (Nginx + PHP-FPM)A step-by-step guide to deploying PHP on Ubuntu: install PHP-FPM, configure an Nginx virtual host, and set correct file permissions.
Deploying Ruby on Rails Apps (Puma + Nginx)Rails production deployment using rbenv for Ruby, Bundler for gems, Puma as a systemd service, and Nginx as a reverse proxy over a Unix socket.
df / duUse df to check free space across filesystems and du to identify disk usage per directory. Also covers ncdu for interactive drill-down investigation.
fdisk / parted (Disk Partition Management)fdisk for interactive MBR/GPT partition management and parted for scriptable non-interactive partition operations on large disks.
Linux Distribution ComparisonA comparison of Debian-based (Ubuntu, etc.) and RHEL-based (AlmaLinux, etc.) distributions, covering package management, release cycles, and support periods.
dnf / yumThe standard package manager for RHEL and AlmaLinux. Manage packages with install, update, and remove, and supports EPEL repositories and package group installs.
DNS Resolution Mechanism and ConfigurationHow Linux resolves hostnames to IP addresses; lookup order is controlled by /etc/nsswitch.conf, and DNS servers are configured via /etc/resolv.conf or systemd-resolved.
fail2banA security tool that automatically detects brute-force attacks and blocks offending IPs via iptables when failed attempts exceed a threshold. Configured per-service in "jail" units.
Linux Filesystem Hierarchy (FHS)The Linux directory layout defined by the Filesystem Hierarchy Standard (FHS), covering the roles of /etc, /var, /usr, /home, /tmp, /proc, and more.
mkfs (Creating Filesystems)A family of commands that format partitions to create filesystems. Covers the differences and use cases for ext4, XFS, and Btrfs.
firewalldThe standard firewall daemon for RHEL and AlmaLinux. Organizes rules by zone and service, and lets you dynamically open ports and persist changes via firewall-cmd.
groupadd / groupdel / usermod (Group Management)Commands for creating and deleting Linux groups and managing group membership. Group information is stored in /etc/group.
iptablesA command-line tool for controlling Netfilter in the Linux kernel. Add rules to the INPUT, OUTPUT, and FORWARD chains to allow or deny network traffic.
journalctlA command for viewing systemd journal logs. Use -u to filter by service, -p to set error level, and --since/--until to narrow by time range.
Linux Kernel UpdateUpdate the Linux kernel with apt upgrade on Ubuntu or dnf update kernel on RHEL/AlmaLinux. Use needs-restarting to decide if a reboot is needed and auto-remove old kernels.
Let's Encrypt + certbot (Free SSL Certificates)A system for automatically obtaining and renewing free SSL/TLS certificates. Run certbot --nginx or --apache to handle certificate issuance and web server configuration automatically.
Linux BasicsCore Linux concepts including the kernel/user-space separation, process management, daemons, and the role of the shell.
logrotateA tool that automatically rotates, compresses, and deletes log files. Place config files in /etc/logrotate.d/ and set rotation triggers with daily, weekly, or size directives.
LVM (Logical Volume Manager)A Linux disk abstraction layer with three tiers — Physical Volumes (PV), Volume Groups (VG), and Logical Volumes (LV) — enabling live expansion and snapshot backups.
ss / netstat (Checking Socket Status)ss (iproute2) for fast socket status display and the legacy netstat (net-tools). Use ss -tlnp to list all listening ports.
ip / nmcli (Network Interface Management)The ip command for checking, adding, and removing IP addresses and routes, alongside nmcli for persistent NetworkManager configuration.
Nginx Overview and Basic ConfigurationNginx as a high-performance web server and reverse proxy. Configuration follows the http → server → location hierarchy for virtual hosts, PHP-FPM integration, and reverse proxying.
Nginx Performance TuningKey Nginx performance settings: worker_processes for CPU core alignment, keepalive_timeout for connection reuse, sendfile for static files, and gzip for compression.
Nginx + PHP-FPMA setup where Nginx serves static files and delegates PHP processing to PHP-FPM via fastcgi_pass, offering better performance and scalability than Apache + mod_php.
Nginx Reverse ProxyForwards client requests to a backend application server (Node.js, Django, Rails, etc.) using proxy_pass. Also handles HTTPS termination and load balancing.
pacman (Arch Linux Package Manager)The standard package manager for Arch Linux and derivatives like Manjaro. Use -Syu to update, -S to install, and yay for AUR packages outside the official repositories.
/etc/passwd and /etc/shadowTwo Linux files managing user information: /etc/passwd stores basic user data (world-readable), while /etc/shadow holds password hashes with strict permissions.
rpm / dpkg (Low-Level Package Management)Low-level package tools that operate beneath dnf and apt. Directly install, remove, query, and verify .rpm and .deb package files.
rsync (Incremental Backup)A command that incrementally synchronizes files between local and remote locations. Transfers only changed files for speed and bandwidth efficiency; widely used with SSH for secure backups.
rsyslogA Linux system log collection daemon. Routes log output based on facility and severity combinations, and supports forwarding to remote servers with the @@ notation.
sar / sysstat (Performance Recording and Analysis)The sar command from the sysstat package collects and stores CPU, memory, I/O, and network statistics over time, allowing historical analysis of past performance issues.
SELinuxA mandatory access control (MAC) framework built into the Linux kernel. Attaches security labels (contexts) to all resources and enforces a policy that allows only explicitly permitted operations. Standard on RHEL and AlmaLinux.
Server Hardening (Initial Security Configuration)Initial security steps for a new server: disable unnecessary services, switch to SSH key auth, enable a firewall, and configure automatic security updates to minimize attack surface.
Special Permissions (setuid / setgid / sticky bit)Three special permissions beyond rwx: setuid runs a file with the owner's privileges, setgid inherits the directory's group, and sticky bit prevents users from deleting others' files in shared directories.
authorized_keys (SSH Public Key Authentication)Register your client-generated public key in ~/.ssh/authorized_keys on the server for passwordless login. The .ssh/ directory requires 700 and authorized_keys requires 600 permissions.
~/.ssh/config (SSH Client Configuration)An SSH client config file where you specify HostName, User, Port, and IdentityFile per host, allowing shorter alias names instead of long command-line options.
ssh-keygen (Generating SSH Key Pairs)A command for generating SSH key pairs. Register the public key on the server and keep the private key locally. ED25519 is recommended for new keys due to its security and speed.
SSH Port Forwarding (Tunneling)A mechanism to forward arbitrary TCP ports through an encrypted SSH connection. Local (-L), remote (-R), and dynamic (-D) forwarding enable secure database access, internal service exposure, and more.
sshd_config (SSH Server Configuration)The SSH server config file at /etc/ssh/sshd_config. Always set PasswordAuthentication no and PermitRootLogin no as baseline security hardening.
Nginx SSL/TLS ConfigurationNginx SSL config combines certificate paths, TLS version selection, cipher suites, and HSTS headers. Disable TLS 1.0/1.1 and allow only 1.2/1.3 to achieve an A+ rating on SSL Labs.
SSL/TLS OverviewA protocol for encrypting internet communication. SSL is the old name; TLS is what is actually used today. Hybrid encryption prevents eavesdropping, tampering, and impersonation, with CAs verifying server identity.
sudo / visudosudo delegates root-level operations to regular users; visudo safely edits the /etc/sudoers configuration file with syntax checking.
systemd Targetssystemd targets replace SysVinit runlevels. Covers multi-user.target (runlevel 3), graphical.target (runlevel 5), and how to switch or set the default target.
systemd TimersSchedule periodic tasks using .timer unit files paired with .service files. Advantages over cron include centralized logging via journalctl and relative time scheduling.
systemd Unit Files (.service)Register your own application as a daemon by creating a .service file with [Unit], [Service], and [Install] sections. Then manage start, stop, and auto-start with systemctl.
top / htop (Real-Time Process Monitoring)top displays real-time CPU, memory, and load average; htop extends it with color, mouse support, and tree view for more intuitive process inspection and signal sending.
ufw (Uncomplicated Firewall)A simplified firewall management tool built into Ubuntu that wraps iptables. Use intuitive commands like ufw allow, deny, and status to manage packet filtering rules.
useradd / userdel / usermod (User Management)Three commands for managing Linux users: useradd creates a user with home directory, shell, and group; usermod modifies settings; userdel -r deletes the user along with their home directory.
/var/log (System Log Directory)The standard Linux directory for logs including kernel messages, authentication records, and service access logs. Monitor in real time with tail -f, search with grep, and query rotated logs with zcat/zgrep.
vmstat / iostat (Performance Statistics)vmstat outputs real-time memory, swap, CPU, and I/O statistics; iostat shows per-disk I/O throughput and latency. Both are lightweight tools for quickly identifying performance bottlenecks.