This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "GNU Core Utilities" – news ·newspapers ·books ·scholar ·JSTOR(June 2011) (Learn how and when to remove this message) |
| GNU Core Utilities | |
|---|---|
| Developer | GNU Project |
| Stable release | |
| Written in | C,shell script[2] |
| Operating system | Unix-like |
| Type | Miscellaneous utilities |
| License | 2007,GPL 3.0 or later since version 6.10 2002,GPL 2.0 or later until version 6.9 |
| Website | www |
| Repository | |
TheGNU Core Utilities orcoreutils is a collection ofGNUsoftware that implements many standard,Unix-basedshellcommands. The utilities generally providePOSIX compliant interface when thePOSIXLY_CORRECT environment variable is set, but otherwise offers a superset to the standard interface. For example, the utilities supportlong options and options after parameters. This environment variable enables a different functionality inBSD.
Similar collections are available in theFOSS ecosystem, with a slightly different scope and focus (less functionality), or license. For example,BusyBox which is licensed underGPL-2.0-only, andToybox which is licensed under0BSD.
Currently, there are over 100 commands implemented by coreutils, with the commands listed below. Throughout this article and customary for Unix-based systems, the termfile refers to allfile system items including regular files and special files such as directories.
chcon – Changes file security context (SELinux)chgrp – Changes file group ownershipchown – Changes file user ownershipchmod – Changes file permissionscp – Copies filesdd – Copies and converts file datadf – Reports file system free spacedir – Likels -C -b; by default lists files in columns, sorted verticallydircolors – Configures colors used forls outputinstall – Copies files and sets file attributesln – Creates a link to a filels – Lists filesmkdir – Creates directoriesmkfifo – Createsnamed pipes (FIFOs)mknod – Createsblock or character special filesmktemp – Createstemporary regular files or directoriesmv – Moves and renames filesrealpath – Reports the absolute or relative path of a filerm – Deletes filesrmdir – Deletes empty directoriesshred – Overwrites a file to hide its contents and optionally deletes itsync – Flushes file system bufferstouch – Changes file timestamps, creating files if they do not existtruncate – Sets the size of a file via truncation or extensionvdir – Likels -l -b; by default lists files in long formatb2sum – Computes and checksBLAKE2b message digestbase32 – Encodes or decodesbase32base64 – Encodes or decodesbase64basenc – Encodes or decodes various encodings includinghexadecimal,base32,base64, and Z85cat –Concatenates filescksum – Report or compute the checksum of filescomm – Compares two sorted files line by linecsplit – Splits a file into sections determined by context linescut – Removes sections from each line of filesexpand – Converts tabs to spacesfmt – Formats textfold – Wraps each input line to fit in specified widthhead – Outputs the first part of filesjoin – Joins lines of two files on a common fieldmd5sum – Computes and checksMD5 message digestnl – Numbers lines of filesnumfmt – Formats numbersod – Dumps files in octal and other formatspaste – Merges lines of filesptx – Produces apermuted index of file contentspr – Paginates or columnates filessha1sum,sha224sum,sha256sum,sha384sum,sha512sum – Computes and checksSHA-1/SHA-2 message digestsshuf – Generates random permutationssort – Sorts lines of text filessplit – Splits a file into piecessum – Checksums and counts the blocks in a filetac – Concatenates files in reverse order, line by linetail – Outputs the last part of filestr – Translates or deletes characterstsort – Performs atopological sortunexpand – Converts spaces to tabsuniq – Removes duplicate lines from a sorted filewc – Reports the number of bytes, words, and lines in filesarch – Reports machine hardware name (same asuname -m)basename – Removes the path prefix from a given pathnamechroot – Changes the root directorydate – Reports or sets the system date and timedirname – Strips non-directory suffix from file namedu – Shows disk usage on file systemsecho – Outputs textenv – Reports and modifiesenvironment variablesexpr – Evaluates expressionsfactor –Factors numbersfalse – Does nothing but exit with unsuccessful statusgroups – Reports thegroups of which the user is a memberhostid – Reports the numeric identifier for the current hostid – Reports the real or effectiveUID andGIDlink – Creates alink to a filelogname – Reports the user's login namenice – Modifiesscheduling prioritynohup – Allows a command to continue running after logging outnproc – Queries the number of (active) processorspathchk – Checks whether file names are valid or portablepinky – A lightweight version offingerprintenv – Reportsenvironment variablesprintf – Formats textpwd – Reports thecurrent working directoryreadlink – Reports the value of asymbolic linkruncon – Run command with specified security contextseq – Reports a sequence of numberssleep – Blocks (delays, waits) for a specified amount of timestat – Reports information about aninodestdbuf – Runs a command with custom standard streams configurationstty – Changes and reports terminal line settingstee – Sends output to multiple filestest – Evaluates an expressiontimeout – Runs a command with atime limittrue – Does nothing but exit with success statustty – Reports theterminal nameuname – Reports system informationunlink – Removes files viaunlink() functionuptime – Reports how long the system has been runningusers – Reports the user names of users currently logged into the current hostwho – Reports logged-in userswhoami – Reports the effectiveuseridyes – Outputs a string repeatedly[ – Synonym fortest that enables expressions like[expression ]In 1990, David MacKenzie announcedGNU fileutils.[3]
In 1991, MacKenzie announcedGNU shellutils andGNU textutils.[4][5] Moreover, Jim Meyering became the maintainer of the packages (known now as coreutils) and has remained so since.[6]
In September 2002, theGNU coreutils were created by merging the earlier packagestextutils,shellutils, andfileutils, along with some other miscellaneous utilities.[7]
In July 2007, the license of the GNU coreutils was updated fromGPL-2.0-or-later toGPL-3.0-or-later.[8]
On April 2026, Canonical is planning to replace the standard,C-based coreutils package with one written inRust in their release ofUbuntu 25.10 and 26.04 LTS.[9] A preview version of the package is currently available, though some complain about performance and security issues.[10]