GNU Core Utilities
The GNU Core Utilities or coreutils is a collection of GNU software that implements many standard, Unix-based shell commands. The utilities generally provide POSIX compliant interface when the environment variable is set, but otherwise offers a superset to the standard interface. For example, the utilities support long options and options after parameters. This environment variable enables a different functionality in BSD.
Similar collections are available in the FOSS ecosystem, with a slightly different scope and focus, or license. For example, BusyBox which is licensed under GPL-2.0-only, and Toybox which is licensed under 0BSD.
Commands
Currently, there are over 100 commands implemented by coreutils, with the commands listed below. Throughout this article and customary for Unix-based systems, the term file refers to all file system items including regular files and special files such as directories.File utilities
-
chconChanges file security context -
chgrpChanges file group ownership -
chownChanges file user ownership -
chmodChanges file permissions -
cpCopies files -
ddCopies and converts file data -
dfReports file system free space -
dirLikels -C -b; by default lists files in columns, sorted vertically -
dircolorsConfigures colors used forlsoutput -
installCopies files and sets file attributes -
lnCreates a link to a file -
lsLists files -
mkdirCreates directories -
mkfifoCreates named pipes -
mknodCreates block or character special files -
mktempCreates temporary regular files or directories -
mvMoves and renames files -
realpathReports the absolute or relative path of a file -
rmDeletes files -
rmdirDeletes empty directories -
shredOverwrites a file to hide its contents and optionally deletes it -
syncFlushes file system buffers -
touchChanges file timestamps, creating files if they do not exist -
truncateSets the size of a file via truncation or extension -
vdirLikels -l -b; by default lists files in long formatText utilities
-
b2sumComputes and checks BLAKE2b message digest -
base32Encodes or decodes base32 -
base64Encodes or decodes base64 -
basencEncodes or decodes various encodings including hexadecimal, base32, base64, and Z85 -
catConcatenates files -
cksumReport or compute the checksum of files -
commCompares two sorted files line by line -
csplitSplits a file into sections determined by context lines -
cutRemoves sections from each line of files -
expandConverts tabs to spaces -
fmtFormats text -
foldWraps each input line to fit in specified width -
headOutputs the first part of files -
joinJoins lines of two files on a common field -
md5sumComputes and checks MD5 message digest -
nlNumbers lines of files -
numfmtFormats numbers -
odDumps files in octal and other formats -
pasteMerges lines of files -
ptxProduces a permuted index of file contents -
prPaginates or columnates files -
sha1sum,sha224sum,sha256sum,sha384sum,sha512sumComputes and checks SHA-1/SHA-2 message digests -
shufGenerates random permutations -
sortSorts lines of text files -
splitSplits a file into pieces -
sumChecksums and counts the blocks in a file -
tacConcatenates files in reverse order, line by line -
tailOutputs the last part of files -
trTranslates or deletes characters -
tsortPerforms a topological sort -
unexpandConverts spaces to tabs -
uniqRemoves duplicate lines from a sorted file -
wcReports the number of bytes, words, and lines in filesShell utilities
-
archReports machine hardware name -
basenameRemoves the path prefix from a given pathname -
chrootChanges the root directory -
dateReports or sets the system date and time -
dirnameStrips non-directory suffix from file name -
duShows disk usage on file systems -
echoOutputs text -
envReports and modifies environment variables -
exprEvaluates expressions -
factorFactors numbers -
falseDoes nothing but exit with unsuccessful status -
groupsReports the groups of which the user is a member -
hostidReports the numeric identifier for the current host -
idReports the real or effective UID and GID -
linkCreates a link to a file -
lognameReports the user's login name -
niceModifies scheduling priority -
nohupAllows a command to continue running after logging out -
nprocQueries the number of processors -
pathchkChecks whether file names are valid or portable -
pinkyA lightweight version of finger -
printenvReports environment variables -
printfFormats text -
pwdReports the current working directory -
readlinkReports the value of a symbolic link -
runconRun command with specified security context -
seqReports a sequence of numbers -
sleepBlocks for a specified amount of time -
statReports information about an inode -
stdbufRuns a command with custom standard streams configuration -
sttyChanges and reports terminal line settings -
teeSends output to multiple files -
testEvaluates an expression -
timeoutRuns a command with a time limit -
trueDoes nothing but exit with success status -
ttyReports the terminal name -
unameReports system information -
unlinkRemoves files viaunlinkfunction -
uptimeReports how long the system has been running -
usersReports the user names of users currently logged into the current host -
whoReports logged-in users -
whoamiReports the effective userid -
yesOutputs a string repeatedly -
History
In 1991, MacKenzie announced GNU shellutils and GNU textutils. Moreover, Jim Meyering became the maintainer of the packages and has remained so since.
In September 2002, the GNU coreutils were created by merging the earlier packages textutils, shellutils, and fileutils, along with some other miscellaneous utilities.
In July 2007, the license of the GNU coreutils was updated from GPL-2.0-or-later to GPL-3.0-or-later.
On April 2026, Canonical is planning to replace the standard, C-based coreutils package with one written in Rust in their release of Ubuntu 25.10 and 26.04 LTS. A preview version of the package is currently available, though some complain about performance and security issues.