↑ arvau

ArchWiki / Core utilities

es:Core utilities hu:Core utilities ja:Core utilities pl:Core utilities pt:Core utilities ru:Core utilities tr:Core utilities zh-hans:Core utilities

Core utilities are the basic, fundamental tools of a GNU/Linux system. This article provides an incomplete overview of them, links their documentation and describes useful alternatives. The scope of this article includes, but is not limited to, the GNU Core Utilities. Most core utilities are traditional Unix tools and many were standardized by POSIX but have been developed further to provide more features.

Most command-line interfaces are documented in man pages, utilities by the GNU Project are documented primarily in Info manuals, some shells provide a help command for shell builtin commands. Additionally most utilities print their usage when run with the --help flag.

Essentials

The following table lists some important utilities which Arch Linux users should be familiar with. See also intro(1).

Preventing data loss

rm, mv, cp and shell redirections happily delete or overwrite files without asking. rm, mv, and cp all support the -i flag to prompt the user before every removal / overwrite. Some users like to enable the -i flag by default using aliases. Relying upon these shell options can be dangerous, because you get used to them, resulting in potential data loss when you use another system or user that does not have them. The best way to prevent data loss is to create backups.

Nonessentials

This table lists core utilities that often come in handy.The moreutils package provides useful tools like sponge(1) that are missing from the GNU coreutils.

Alternatives

Alternative core utilities are provided by the following packages:

cat alternatives

cd alternatives

See also Bash#Auto "cd" when entering just a path and Zsh#Remembering recent directories.

date alternatives

cp alternatives

Using rsync#As cp/mv alternative allows you to resume a failed transfer, to show the transfer status, to skip already existing files and to make sure of the destination files integrity using checksums.

ls alternatives

find alternatives

For graphical file searchers, see List of applications/Utilities#File searching.

diff alternatives

While diffutils does not provide a word-wise diff, several other programs do:

  • git diff can do a word diff with --color-words, using --no-index it can also be used for files outside of Git working trees.

See also List of applications/Utilities#Comparison, diff, merge.

grep alternatives

Code searchers

These tools aim to replace grep for code search. They do recursive search by default, skip binary files and respect .gitignore.

See also: cscope.

Interactive filters

dd alternatives

See also: dd and ddrescue

Alternative dd implementations

This subsection lists dd implementations whose interface and default behaviour is mostly compliant with the POSIX specification of dd(1p).

Spin-offs of GNU dd

The GNU implementation of dd found in coreutils also conforms to POSIX. This subsection lists its forks.

Modernised dd analogues

This subsection lists dd alternatives that do not conform to POSIX (in terms of the JCL-resembling command-line syntax and default behaviour).

buffer spin-offs

This subsection lists forks of buffer, a general-purpose I/O buffering utility similar to dd but has a dynamic-sized buffer. It supports blockwise I/O and can be used when dumping from/to an LTO-tape to avoid shoe shining.

df alternatives

du alternatives

See also List of applications/Utilities#Disk usage display.

POSIX shell utilities

Many common packages already install most popular POSIX utilities as dependencies, but the posix metapackage can be installed to ensure all of them being always present.

Beside mandatory utilities, there are also metapackages for some of the optional categories:

Not all optional utilities from given category are necessarily present in corresponding metapackage.

Tips and tricks

Override or add missing coreutils

Some commands (arch, kill, etc.) are missing from coreutils or taken from other packages. To complete them for compatibility, install uutils-coreutils and do:

# ln -sf /usr/bin/uu-coreutils /usr/local/bin/arch
# echo -e "#compdef arch=uu-arch\n_uu-arch" > /usr/local/share/zsh/site-functions/_arch
# echo "complete -c arch -w uu-arch" > /usr/local/share/fish/vendor_completions.d/arch.fish

See also