1. Commands

Table 1.10. Commands

Command

Description

addgroup

add a user or group to the system

adduser

add a user or group to the system

alias

Creates user defined alias

apk

apropos

search the manual page names and descriptions

apt install

Installs application (on Debian based systems)

apt search

Searches for application (on Debian based systems)

apt

command-line interface

as

the portable GNU assembler

ash

awk

pattern scanning and processing language

base64

base64 encode/decode data and print to standard output

basename

strip directory and suffix from filenames

basename

parse pathname components

bash -x

bash

GNU Bourne-Again SHell

bg

move process to background

bzip2

a block-sorting file compressor, v1.0.8

cat

concatenate files and print on the standard output

cc

GNU project C and C++ compiler

cd

Change directory

chattr

change file attributes on a Linux file system

chgpasswd

update group passwords in batch mode

chgrp

change group ownership

chmod

change file mode bits

chmod

change permissions of a file

chown

change file owner and group

chown

change ownership of a file

chpasswd

update passwords in batch mode

chroot

change root directory

chroot

run command or interactive shell with special root directory

clear

clear the terminal screen

cp

copy files and directories

cpan

easily interact with CPAN from the command line

cpio

copy files to and from archives

cpp

The C Preprocessor

cron

daemon to execute scheduled commands (Vixie Cron)

crontab

maintain crontab files for individual users (Vixie Cron)

crontab

tables for driving cron

csh

cut

remove sections from each line of files

date +%F

date --date='-10 min'

date

print or set the system date and time

dd

convert and copy a file

debconf

run a debconf-using program

delgroup

remove a user or group from the system

delpart

tell the kernel to forget about a partition

deluser

remove a user or group from the system

df -h

df

report file system disk space usage

diff

compare files line by line

dir

list directory contents

dirname

strip last component from file name

dirname

parse pathname components

dmesg

print or control the kernel ring buffer

docker

dpkg

package manager for Debian

du -hs

du

estimate file space usage

echo -e

echo -n

echo

display a line of text

ed

line-oriented text editor

edit

egrep

print lines that match patterns

eject

eject removable media

encguess

guess character encodings of files

env

Show all environmental variables

env

run a program in a modified environment

exit 0

exit 1

exit

terminate the calling process

exit

cause normal process termination

expand

convert tabs to spaces

export

Set environment variable

fakeroot

run a command in an environment faking root privileges for file manipulation

fdisk

manipulate disk partition table

fg

move process to foreground

file

determine file type

file

overview of system data types

find

search for files in a directory hierarchy

fork

basic process management

free

Display amount of free and used memory in the system

free

allocate and free dynamic memory

fsck

check and repair a Linux filesystem

g++

GNU project C and C++ compiler

gcc

GNU project C and C++ compiler

gettext

translate message

gettext

translate message

git

the stupid content tracker

go

gpg

OpenPGP encryption and signing tool

grep

print lines that match patterns

groupadd

create a new group

groupdel

delete a group

groupmod

modify a group definition on the system

groups

print the groups a user is in

grub-mkconfig

generate a GRUB configuration file

grub

gunzip

compress or expand files

gzip

compress or expand files

halt

Halt, power-off or reboot the machine

hash

hash database access method

hdparam

head

output the first part of files

hexdump

display file contents in hexadecimal, decimal, octal, or ascii

hostname

show or set the system's host name

hostname

Local hostname configuration file

hostname

hostname resolution description

hostnamectl

Control the system hostname

htop

interactive process viewer

iconv

convert text from one character encoding to another

iconv

perform character set conversion

id

print real and effective user and group IDs

jacktheripper

java

javac

jobs

join

join lines of two files on a common field

journalctl

Query the systemd journal

jq

json_pp

jsondiff

kill -9

kill

send a signal to a process

kill

send signal to a process

killall

kill processes by name

kpartx

Create device maps from partition tables

l

la

last

show a listing of last logged in users

ld

The GNU linker

ldconfig

configure dynamic linker run-time bindings

less

opposite of more

ll

ln -s

ln

make links between files

locale-gen

generates localisation files from templates

locale

get locale-specific information

locale

describes a locale definition file

locale

description of multilanguage support

localectl

Control the system locale and keyboard layout settings

localedef

compile locale definition files

locate

Locates file (from updatedb database)

login

begin session on the system

login

write utmp and wtmp entries

logname

print user's login name

logout

write utmp and wtmp entries

logrotate

rotates, compresses, and mails system logs

ls

list directory contents

lsattr

list file attributes on a Linux second extended file system

lsb_release

print distribution-specific information

lsmod

Show the status of modules in the Linux Kernel

lsof

list open files

lspci

list all PCI devices

lsusb

list USB devices

lvm

LVM2 tools

lxc

lzma

Compress or decompress .xz and .lzma files

make

GNU make utility to maintain groups of programs

man

an interface to the system reference manuals

man

macros to format man pages

mc

Midnight Commander

md5sum

compute and check MD5 message digest

mdmon

monitor MD external metadata arrays

meminfo

memusage

profile memory usage of a program

mesg

display (or do not display) messages from other users

mkdir

make directories

mkdir

create a directory

mkfs

build a Linux filesystem

mkinitramfs

low-level tool for generating an initramfs image

mkswap

set up a Linux swap area

modprobe

Add and remove modules from the Linux Kernel

more

file perusal filter for crt viewing

mount

mount filesystem

mount

mount a filesystem

mv

move (rename) files

nano

Nano's ANOther editor, inspired by Pico

nice

run a program with modified scheduling priority

nice

change process priority

nohup

run a command immune to hangups, with output to a non-tty

nologin

prevent unprivileged users from logging into the system

nologin

politely refuse a login

npm

nproc

print the number of processing units available

open

open and possibly create a file

openssl

OpenSSL command line program

parted

a partition manipulation program

partx

tell the kernel about the presence and numbering of on-disk partitions

pasebinit

passwd

change user password

passwd

the password file

patch

apply a diff file to an original

pbget

compress and encode arbitrary files to pastebin.com

pbput

compress and encode arbitrary files to pastebin.com

pdb

perl

pico

Nano's ANOther editor, inspired by Pico

pidof

find the process ID of a running program.

pidwait

look up, signal, or wait for processes based on name and other attributes

pip

pkill

look up, signal, or wait for processes based on name and other attributes

pkill

Kill all instances of a process by pattern matching the command-line

pmap

report memory map of a process

poweroff

Halt, power-off or reboot the machine

printenv

print all or part of environment

printf

format and print data

printf

formatted output conversion

ps aux

ps

report a snapshot of the current processes.

pslog

report current logs path of a process

pstree

display a tree of processes

puts

output of characters and strings

pwd

print name of current/working directory

python3 -m http.server

python3

rcp

OpenSSH secure file copy

read

read from a file descriptor

readline

get a line from a user with editing

readlink

print resolved symbolic links or canonical file names

readlink

read value of a symbolic link

readonly

reboot

reboot or enable/disable Ctrl-Alt-Del

reboot

Halt, power-off or reboot the machine

renice

alter priority of running processes

reset

terminal initialization

resizepart

tell the kernel about the new size of a partition

rm -fr

rm

Remove

rm

remove files or directories

rmdir

remove empty directories

rmdir

delete a directory

rmmod

Simple program to remove a module from the Linux Kernel

rsync

Syncronizes two directories

rsync

a fast, versatile, remote (and local) file-copying tool

run-parts

run scripts or programs in a directory

runlevel

Print previous and current SysV runlevel

scp

OpenSSH secure file copy

screen

screen manager with VT100/ANSI terminal emulation

sed

stream editor for filtering and transforming text

seq

print a sequence of numbers

service

run a System V init script

set +e

set -e

set

setcap

set file capabilities

setterm

set terminal attributes

sh -x

sh

command interpreter (shell)

sha1sum

compute and check SHA1 message digest

sha256sum

compute and check SHA256 message digest

sha512sum

compute and check SHA512 message digest

shasum

Print or Check SHA Checksums

shred

overwrite a file to hide its contents, and optionally delete it

shutdown

shut down part of a full-duplex connection

shutdown

Halt, power-off or reboot the machine

size

list section sizes and total size of binary files

skill

send a signal or report process status

sleep

delay for a specified amount of time

sleep

sleep for a specified number of seconds

snap

sort

sort lines of text files

source

split

split a file into pieces

stat

display file or file system status

strace

trace system calls and signals

strings

print the sequences of printable characters in files

stty

change and print terminal line settings

stty

unimplemented system calls

su

run a command with substitute user and group ID

sudo

execute a command as another user

sum

checksum and count the blocks in a file

suspend

swapoff

start/stop swapping to file/device

swapoff

enable/disable devices and files for paging and swapping

swapon

start/stop swapping to file/device

swapon

enable/disable devices and files for paging and swapping

sync

Synchronize cached writes to persistent storage

sync

commit filesystem caches to disk

sysctl

read/write system parameters

sysctl

configure kernel parameters at runtime

systemctl

Control the systemd system and service manager

systemd

systemd system and service manager

tail -f

tail

output the last part of files

tailf

tar jc

tar jx

tar zc

tar zx

tar

an archiving utility

tee

read from standard input and write to standard output and files

tee

duplicating pipe content

tempfile

create a temporary file in a safe manner

test

check file types and compare values

time

run programs and summarize system resource usage

time

get time in seconds

time

overview of time and timers

timeout

run a command with a time limit

times

get process times

toe

table of (terminfo) entries

top

display Linux processes

touch

change file timestamps

tput

initialize a terminal or query terminfo database

tr

translate or delete characters

trap

tree

list contents of directories in a tree-like format

tset

terminal initialization

tty

print the file name of the terminal connected to standard input

tty

controlling terminal

type

tzconfig

tzselect

view timezones

tzselect

select a timezone

ulimit

get and set user limits

umask

set file mode creation mask

unalias

uname -a

uname -r

uname

print system information

uname

get name and information about current kernel

uniq

report or omit repeated lines

unlink

call the unlink function to remove the specified file

unlink

delete a name and possibly the file it refers to

unlzma

Compress or decompress .xz and .lzma files

unset

unzip

update-alternatives

maintain symbolic links determining default commands

update-grub

stub for grub-mkconfig

update-locale

Modify global locale settings

updatedb

Scans filesystem and create database for locate

uptime

print time since last reboot

useradd

create a new user or update default new user information

userdel

delete a user account and related files

usermod

modify a user account

users

print the user names of users currently logged in to the current host

uuidgen

create a new UUID value

vi

Vi IMproved, a programmer's text editor

view

Vi IMproved, a programmer's text editor

vim

Vi IMproved, a programmer's text editor

vimdiff

edit between two and eight versions of a file with Vim and show differences

visudo

edit the sudoers file

vmstat

Report virtual memory statistics

w

Show who is logged on and what they are doing

wait

wait for process to change state

wall

write a message to all users

watch

execute a program periodically, showing output fullscreen

wc -c

print number of characters in file

wc -l

print number of lines in file

wc

print newline, word, and byte counts for each file

whatis

display one-line manual page descriptions

whereis

locate the binary, source, and manual page files for a command

which

locate a command

who

show who is logged on

whoami

print effective userid

write

send a message to another user

write

write to a file descriptor

xargs

build and execute command lines from standard input

xz

Compress or decompress .xz and .lzma files

zip