Command Reference Manual
View 237 orders by topic.
Get to know the workspace
pwdShow current locationlsList files and directoriescdSwitch working directorytreeObserve the directory structuremanQuery command manualhelpView support scoperealpathParse absolute pathswhichFind external command locationtypeIdentify built-in and external commandslocateFind a file in the indexupdatedbUpdate file indexpushdEnter the directory and push onto the directory stackpopdPop directory stackdirsShow directory stack
Organize files
mkdirCreate directorytouchCreate empty filecpCopy a file or directorymvMove or renamermDelete a file or directoryrmdirDelete empty directoriesfileDetermine file typestatView file propertiesbasenameGet the name at the end of the pathdirnameGet the parent directory pathrsyncSynchronize directories and filesgitManage code versionsmktempCreate a temporary file or directorytruncateAdjust file lengthinstallCopy and set installation permissionsrenameBatch rename based on expressionddCopy data in chunkssyncFlush file system cachesha256sumGenerate or inspect SHA-256 digestmd5sumGenerate or inspect MD5 digestcksumCalculate CRC check valuebase64Encode or decode Base64
Let commands collaborate
echoOutput a piece of textprintfOutput text according to formatteeOutput and save pipeline contentsxargsConvert input into command parametersexportSet environment variablesenvView environment variablesprintenvOutput the value of environment variableunsetRemove variableshistoryView command historyclearClear the terminal displaytrueReturn success statusfalseReturn failure statusseqGenerate a sequence of numberssleepPause for specified timealiasSet command aliasunaliasRemove command aliassourceRead script in current ShellreadRead variables from inputbashRun the Bash scriptshRun the POSIX Shell scriptcommandControl command lookupjobsView current Shell jobsbgResume background jobfgResume foreground jobwaitWait for child process to endnohupIgnore hangup signal and runtimeoutLimit command running timewatchDisplay command results periodicallytimeMeasure run timeulimitView or set resource limitssetSet Shell behaviortrapHandle exit or signaltmuxManage terminal sessionsscreenKeep terminal session
Read and process text
catRead and concatenate textlessRead text in pagesmoreView text in pagesheadRead the first few linestailRead last few linesgrepFilter text by patternfindFind paths by name or typewcCount lines, words and bytessortSort lines of textuniqMerge adjacent duplicate rowscutExtract columns or characterstrReplace or delete characterssedReplace text or select linesawkExtract structured text fieldsdiffCompare two text filesvimEdit files in terminalnanoModify files with a simple editornlNumber lines of texttacOutput lines of text in reverse orderrevReverse characters line by linepasteSplicing text columns horizontallycommCompare sorted listscmpCompare files to see if they are the sameexpandConvert Tab to spacesunexpandConvert leading spaces to TabfoldWrap long textrgFast recursive text searchjqHandle JSONyqHandle YAMLjoinMerge sorted tables by common fieldsfmtReformat paragraphs word by wordcolumnArrange text tablestringsExtract printable text from binaryodView file byte representationhexdumpShow hexadecimal bytesxxdView or restore hex dumpiconvConvert text encodingdos2unixConvert Windows to newlinesplitSplit file by linescsplitSplit text by patternbcEvaluate a numeric expression
Permissions and links
chmodModify permissionschownModify ownerumaskSet new file permission masklnCreate symbolic linkreadlinkView symbolic link targetssudoExecute command as administratorgroupsQuery user groupchgrpModify the group to which the file belongsgetfaclView extended access controlsetfaclSet up extended access controllsattrQuery file attribute flagschattrModify file attribute flagssuSwitch user sessionpasswdChange account passworduseraddcreate AccountusermodModify account propertiesuserdelDelete accountgroupaddCreate user groupgetentQuery system account database
Packaging and compression
tarPack, view and restore archivesgzipcompressed filegunzipRecover compressed fileszipCreate ZIP archiveunzipUnzip the ZIP archivebzip2Use bzip2 compressionbunzip2Unzip the bzip2 filexzUse xz compressionunxzUnzip the xz filezcatRead gzip filezgrepSearch for gzip textzstdUse Zstandard compression7zManage multiple archive formats
observation system
psView process listpgrepCheck process number by namekillSend signal to processpkillEnd process by nametopView system process snapshotfreeView memory overviewdfView file system spaceduEstimated directory usageunameView kernel informationwhoamiShow current useridView users and user groupshostnameView host namedateView dateuptimeView running timenprocQuery the number of available processorswhoView login sessionwView sessions and loadttyView terminal device namelscpuView CPU topologylsblkView block devices and file systemsfindmntView mounting relationshipsvmstatObserve memory and CPU indicatorsdmesgView kernel messageshtopInteractively view process resourceslsofView open files and portsfuserFind processes occupying files or portsiostatWatch the disk with the CPU indicatorpidstatObserve process resource usagesarQuery system performance recordsniceSpecify process scheduling priorityreniceAdjust the priority of existing processesioniceAdjust I/O scheduling prioritystraceTracing system callsperfSampling performance eventsmountMount file systemumountUnmount file systemblkidQuery block device identifierfdiskView or edit partitionspartedManage disk partitionsmkfsCreate file systemfsckCheck file systemswaponEnable or query swap spaceswapoffDisable swap spacelsmodList kernel modulesmodinfoQuery kernel module informationmodprobeLoad kernel modulelsusbView USB devicelspciView PCI devicegetconfView system configuration values
Troubleshoot the network
ipQuery address and routingssView sockets and listening portspingCheck host connectivitydigQuery DNS recordsnslookupQuery host addresscurlRequest URL or download contentwgetDownload filesshLog in to the remote machinescpCopy files via SSHhostQuery DNStracerouteProbing network routestracepathDetection path and MTUmtrContinuously observe routing and packet lossncTest connection or listening portsocatConnect data streams to socketstcpdumpCapture network packetsnmapDetect authorized host portethtoolQuery network interface informationnmcliManage NetworkManager connectionssftpTransfer files interactively through SSHssh-keygenGenerate SSH keyssh-copy-idInstall the SSH public keyopensslCheck TLS with certificate
Management services
systemctlQuery and Management systemd ServicesjournalctlView service logsaptManage Debian/Ubuntu packagescrontabSchedule periodic tasksdockerManage containersserviceManage traditional serviceshostnamectlQuery or set hostnametimedatectlQuery time and time zoneloginctlQuery login sessionatSchedule one-time tasksdpkgQuery Debian packageapt-cacheQuery APT package metadataapt-getManage APT package in scriptdnfManage Fedora packagesyumManagement RPM series software packagesrpmQuery RPM packagepacmanManage Arch packagesapkManage Alpine packagespodmanManage containers and imageskubectlManage Kubernetes resourcesnginxCheck Web service configurationlogrotateRotate log files