Command reference
272 commands, each with the options you actually use, real examples and the gotchas that bite in production.
A
aliasdefine or display aliasesamtoolView and modify the current Alertmanager stateapropossearch the manual page names and descriptionsaptpackage manager for Debian and Ubuntuapt-cachequery the APT package cacheapt-getpackage manager for Debian and Ubuntuapt-markmark packages held (never upgraded by apt upgrade)argocdArgo CD command line (v3.5)arpmanipulate the system ARP cache (net-tools, deprecated)awkpattern scanning and processing languageazAzure command-line interface
B
C
capshcapability shell wrappercatconcatenate files and print on the standard outputcdchange the working directorycheckovstatic analysis of infrastructure as code for security and compliance misconfigurationschgrpchange group ownershipchmodchange file mode bitschownchange file owner and groupclearclear the terminal screencolumncolumnate listscommandrun a command bypassing functions and aliasescontinueskip to the next iteration of a loop (bash builtin)cpcopy files and directoriescranea tool for interacting with remote images and registries (go-containerregistry)crictlCLI for CRI-compatible container runtimes (containerd) - what the kubelet seescurltransfer a URLcutremove sections from each line
D
dateprint or set the system date and timedeactivateleave a Python virtual environment (a shell function the venv's activate script defines)declaredeclare variables and give them attributesdfreport filesystem disk space usagedigDNS lookup utilitydirnamestrip the last component from a filenamedisownremove jobs from the shell's job table (bash builtin)dmesgprint or control the kernel ring bufferdockerDocker image and container command line interfacedocker-composeDefine and run multi-container applicationsdpkgDebian package manager, one level below aptduestimate file space usage
E
echodisplay a line of textegrepgrep -Eenvrun a program in a modified environment, or print the environmentetcdctletcd v3 client (etcd 3.6: talks to a live member)etcdutletcd offline utility: works on snapshot files and data directoriesevalevaluate arguments as a shell commandexecreplace the shell with a commandexitexit the shellexportset an export attribute for shell variables
F
G
gawkpattern scanning and processing languagegetentget entries from Name Service Switch librariesgetoptsparse option arguments in a shell scriptgitthe stupid content trackergpasswdadminister /etc/groupgpgOpenPGP encryption and signing toolgrepprint lines matching a patterngroupaddcreate a new groupgroupdeldelete a groupgroupsprint the groups a user is in
H
I
J
javalaunch a Java applicationjcmdsend diagnostic command requests to a running Java Virtual Machinejinfogenerate Java configuration information for a specified Java processjmapprint details of a specified processjobslist active jobsjournalctlquery the systemd journaljpslist the instrumented JVMs on the target systemjqcommand-line JSON processorjstackprint Java thread stack traces for a running Java processjstatmonitor JVM statistics
K
keytoolmanage a Java keystore of cryptographic keys, certificate chains and trusted certificateskillsend a signal to a processkillallkill processes by exact namekubeadmbootstrap and operate a kubeadm clusterkubectlkubectl controls the Kubernetes cluster managerkubectl attachAttach to a running containerkubectl authInspect authorizationkubectl autoscaleAuto-scale a deployment, replica set, stateful set, or replication controllerkubectl certificateApprove or deny certificate signing requestskubectl cpCopy files and directories to and from containerskubectl createCreate a resource from a file or from stdin, or with a generatorkubectl create-ingressCreate an ingress with the specified namekubectl debugCreate debugging sessions for troubleshooting workloads and nodeskubectl drainDrain node in preparation for maintenancekubectl port-forwardForward one or more local ports to a podkubectl proxyRun a proxy to the Kubernetes API serverkubeletthe node agent (run by systemd as kubelet.service)kubeloginclient-go credential plugin for Entra ID (Azure AD) authentication to AKSkubesealencrypt a Kubernetes Secret into a SealedSecret only the cluster's controller can decryptkustomizetemplate-free customization of Kubernetes YAML (v5.7)
L
lesspage through text one screen at a timeletevaluate arithmetic expressionslnmake links between fileslocalcreate a function-local variablelogcliCommand-line client for Lokilogoutexit a login shelllslist directory contentslsb_releaseprint distribution-specific informationlsblklist block deviceslsmodshow the loaded kernel moduleslsnslist namespaceslsoflist open fileslspcilist PCI deviceslvextendadd space to an LVM logical volume
M
manan interface to the system reference manualsmapfileread lines from stdin into an arraymawkpattern scanning and processing languagemkdirmake directoriesmkfs.ext4create an ext4 filesystemmktempcreate a temporary file or directory safelymodprobeadd a kernel modulemorepage through text one screen at a timemountmount a filesystem, or list what is mountedmtra network diagnostic tool combining traceroute and pingmvmove (rename) files
N
nameifollow a pathname until a terminal point is foundnanoa small and friendly text editorncarbitrary TCP and UDP connections and listens (OpenBSD netcat)nerdctla docker-compatible CLI for containerdnetplanYAML network configuration abstraction for various backendsnetworkctlQuery or modify the status of network links (systemd-networkd)newgrplog in to a new groupnginxsmall, but very powerful and efficient web servernlnumber lines of filesnohuprun a command immune to hangups, with output to a non-ttynprocprint the number of processing units availablensenterrun program in different namespacesnslookupquery Internet name serversnstatnetwork statistics tool
O
ocOpenShift command-line client: kubectl plus the OpenShift APIsoc admTools for managing an OpenShift clusteroc debugLaunch a new instance of a pod for debuggingoc exposeExpose a replicated application as a service or routeoc loginLog in to a serveroc new-appCreate a new applicationoc start-buildStart a new buildoc statusShow a high level overview of the current projectoddump files in octal and other formatsopensslOpenSSL command line program
P
parteda partition manipulation programpgreplist process IDs matching a patternpidoffind the process ID of a running programpingsend ICMP ECHO_REQUEST to network hostspipthe Python package installerpip3the Python package installerpipxinstall and run Python applications in isolated environmentspkillsignal processes by name or other attributepodmandaemonless, rootless-capable container engine with a docker-compatible CLIpoweroffpower off the machineprintenvprint all or part of the environmentprintfformat and print dataprometheusThe Prometheus monitoring serverpromtoolTooling for the Prometheus monitoring systempsreport a snapshot of the current processespstreedisplay a tree of processespwdprint name of current working directorypytestsimple powerful testing with Pythonpythonan interpreted, interactive, object-oriented programming languagepython3an interpreted, interactive, object-oriented programming language
R
readread a line from standard inputreadarrayread lines from stdin into an array (bash builtin, same as mapfile)readlinkprint the target of a symbolic linkreadonlymark variables as unchangeablerealpathprint the resolved absolute pathnamerebootreboot the machineresize2fsext2/ext3/ext4 file system resizerresolvectlresolve domain names, IPV4 and IPv6 addresses, DNS resource records, and services; introspect and reconfigure the DNS resolverreturnreturn from a shell functionrevreverse the characters of every linermremove files or directoriesrmdirremove empty directories
S
scpOpenSSH secure file copysedstream editor for filtering and transforming textseqprint a sequence of numberssetset or unset shell options and positional parameterssetsidrun a program in a new sessionshcommand interpreter (on Ubuntu, a link to dash; here bash in POSIX mode)sha256sumcompute SHA256 message digestshellcheckstatic analysis tool for shell scriptsshiftshift positional parametersshutdownhalt, power off or reboot the machineskopeocommand line utility to inspect and copy container images and image repositories, without pulling or a daemonsleepdelay for a specified timesortsort lines of text filessourceread and execute a file in the current shellssanother utility to investigate socketssshOpenSSH remote login clientssh-keygenauthentication key generationstatdisplay file or filesystem statusstracetrace system calls and signalssurun a command with substitute user and group IDsudoexecute a command as another userswapoffdisable swapswaponenable swap, or show what is in usesyncsynchronize cached writes to persistent storagesysctlconfigure kernel parameters at runtimesystemctlcontrol the systemd system and service managersystemd-analyzeanalyse system boot performance and unit filessystemd-cglsshow the cgroup hierarchysystemd-cgtoptop for cgroups: CPU, memory and I/O per unitsystemd-runrun a command in a transient unit or scope
T
tacconcatenate and print files in reverse (last line first)tailoutput the last part of filestaran archiving utilitytcpdumpdump traffic on a networkteeread stdin and write to both stdout and filesterraformbuild, change and destroy infrastructure as codetestevaluate an expressiontflinta pluggable linter for Terraform configurationstimeoutrun a command with a time limittopdisplay Linux processestouchchange file timestamps, creating empty files as neededtrtranslate or delete characterstracepathtraces path to a network host discovering MTU along this pathtracerouteprint the route packets trace to network hosttraprun a command when a signal is receivedtreelist contents of directories in a tree-like formattrivya scanner for vulnerabilities in container images, filesystems and git repositories, and misconfigurations in IaCtruedo nothing, successfullytruncateshrink or extend the size of a filetune2fsadjust tunable filesystem parameters on ext2/3/4typedescribe how a command name would be interpreted
U
ulimitmodify shell resource limitsumaskset the file mode creation maskunaliasremove alias definitionsunameprint system informationuniqreport or omit repeated adjacent linesunsetunset values and attributes of variablesupdate-ca-certificatesupdate /etc/ssl/certs and ca-certificates.crtuptimetell how long the system has been runninguseraddcreate a new user or update default new user informationuserdeldelete a user account and related filesusermodmodify a user account
V
W
wshow who is logged on and what they are doingwaitwait for a job to completewcprint newline, word and byte counts for each filewgetthe non-interactive network downloaderwhereislocate the binary, source and manual page files for a commandwhichlocate a command in $PATHwhoshow who is logged onwhoamiprint effective user name
X
xargsbuild and execute command lines from standard input