I’m taking notes on ranking the usefulness of all GNU Core Utils provided in this video, see also List of GNU Core Utilities commands, and GNU Core Utils Manual. They exist in almost all Linux distributions, acually they are part of your linux system! (becasue Linux = Linux Kernel + GNU Utils)
I also changed his ranking a bit based on my ideas!
Another change is that, some very important very basic command-line utils, although not part of core utils, were also added here because of their importance and usefulness. They are cd
, grep
, find
, sed
, awk
, tar
, sudo
and fzf
. Non basic command-line utils like yazi
or ranger
can also be very useful but they should be put into a separate page.
Tip: If you want to learn about a command listed here, for example grep
, try one of the commands for a manual:
man grep # Open a complete manual for grep
tldr grep # Short prompts and examples for using grep
You will need to install man
or tldr
to see the manual.
cat
prints or concats the content of files.
cd
changes directory.
chmod
is used to change permissions of files or directories.
chown
is used to change the owner of files or directories.
cp
is used to copy.
echo
prints text
env
run a program in a modified enviroment.
groups
command prints a list of groups that a user belongs to.
kill
is used to send signal or terminate a process.
ln
is used to create links.
ls
list files in a directory.
mkdir
is used to create directory, absolutely useful.
mv
is used to move or rename a file.
pwd
command prints the current working directory.
rm
removes file or directories.
su
switches user or root.
sudo
run as root.
touch
creates an empty file, or update the atime of an existing file.
grep
can be used to search text.
find
can be used to search files.
fzf
can be used to search files or make option menus. Unlike other tools in this list, it is not part of GNU Core utils or shell command line default tools, and is usually not installed by default.
basename
strips directory and suffix from filenames.
chroot
primitive form of containerization.
date
command prints the current date.
dd
convert and copy a file. It can deal with low level things, but is an a bit dangerous command.
df
prints the disk info (free space).
dirname
converts a file name to its directory name.
head
prints the first few lines.
mktemp
is used to create temporary files and directories.
nice
command can be used to run command with a given priority level.
nohup
runs a command immune to hangups with output to a non-tty. It is useful for running long running commands.
realpath
is used to resolve a canonical absolute path of a file, including ambiguities like symlinks.
sleep
is used to delay.
sort
is used to sort lines in a file.
sync
synchronize cached writes to persistent storage.
tail
prints the last lines of a file.
tee
sends output to file and prints at the same time.
timeout
will be able to restrict the amount of time a command runs, avoiding stucking.
uniq
counts the unique lines.
users
prints the user names of users currently logged in.
wc
counts the number of words or lines.
whoami
prints the current user, frequently used in scripts.
b2sum
is used to do checksums.
base32
does similar things with base64
and instead of 64, it does 32.
base64
can convert binary data into ascii encoding.
comm
command can compare two sorted files line by line, or perform set operations on lines.
cut
remove sections from each line of files, companion of paste
.
du
provides estimation on file space usage.
expr
evaluate logical or mathematical expressions.
false
is the opposite of true
.
fmt
is a text formatter.
fold
wrap each input file to fit specified width.
install
copies files and sets attributes.
join
join lines of two files on a common field.
md5sum
is used to do checksums.
mkfifo
create named pipes (FIFOs) with the given names. It is a magical gate for inter process communication on your file system!
paste
merges lines of files.
printf
prints text in advanced formmating options.
rmdir
is used to remove empty directory only, it is a safe alternative for rm
.
sed
for text editing
awk
a text editing ‘programming language’
sha256sum
is used to do checksums.
sha512sum
is used to do checksums.
tr
does character level replace, it translate or delete characters.
tar
is used to manage tarballs.
true
is placeholder for success return code.
uname
is used to print your system informations.
uptime
prints the live time since last boot.
[
is a synonym for test
.
hostname
prints the hostname.
id
real effective user and group id.
nproc
tells the number of cpus in your system. It may be useful to be used as an argument to a makefile.
od
can be used to dump files in octal or other formats.
shuf
command can be used to generate random test cases.
stty
can be used to change advanced features of a terminal.
tty
print the file name of the terminal connected to standard input.
readlink
can be used to read symbolic links.
seq
prints a sequence of numbers.
stdbuf
yes
can be used in script to provide y
for confirmations.
chcon
changes the file security context.
chgrp
changes group ownership of a file or directory. Note that chown
already does the job.
dircolors
can be used to configure the colors of files in your system.
factor
is used to factor integers.
logname
mknod
numfmt
is used to format numbers.
pathchk
check whether file names are valid or portable.
sha1sum
stat
display file or file system status.
tac
concatenate and print files in reverse.
truncate
shrinkes or expand to a file to the specific size.
who
shows the list of users that are currently logged in. The author of the video gave it D-tier but I think in a multiuser system this can be quite useful, so I think it belongs to C-tier.
arch
is used to print archetecture.
cksum
is obsolete.
csplit
split a file into sections determined by context lines.
dir
expand
converts all tabs into spaces in a file. I think this may be useful for some programming languages. But typically it is not of much use.
hostid
prints the numeric identifier for the current user. Not really useful.
link
pinky
pr
printenv
ptx
runcon
is only used in SELinux.
sha224sum
sha384sum
shred
command overwrites a file to hide its contents for better deletion.
sum
tsort
unexpend
is the inverse of expand
but it is not very stable.
unlink
vdir
is almost just ls -l
.