Professional Documents
Culture Documents
Wbrandes - Linux System Administration
Wbrandes - Linux System Administration
web address usage of files all files, not same directory, with a
in directory just direct‐ different name
ssh Remote login "ssh
or command userna‐ ories rmdir Removes a directory
run me@ser‐ free Shows amount of free & and mkdir Creates -p to make parents;
ver" used memory in system a can build a chain of
scp, sftp Remote file copy df Report on file system & disk directory non-existent direct‐
space usage ories all at once
openssl For generating stuff for
encryption lsblk Report info about block touch Updates Can be used to create
devices a file's files- it will create a file
ssh- For generating public/private
last-e‐ if the given file does
keygen key pairs fdisk Manipulate l: list disks
dited not exist
dnf Package manager for Fedora. disk
date.
Use it to download, update, partioning
history lists history of previous commands
and install all sorts of software Uname Print system information
man Lists manual page for a given
ifconfig Use without parameters to get export For setting an environment
command, that'll tell you alllll
general info on network variable
about what a command can do
connections. Also used for unmount Unmounts the specified disk
and how to use it
assigning IP addresses and
eject Ejects the specified disk
setting up networking config reboot Reboots the machine
stuff for interface devices
Common Commands
Directories
netmask Used for setting network
Name Description Parameters/Notes
submask Directory Description
ls list l: long, more
route For adding entries to a routing /etc All sorts of system-wide config‐
everything detailed view. a:
table uration stuff
in given show all, even
netstat For displaying network info /proc/‐ CPU info
directory hidden files/direct‐
cpuinfo
ip For Internet Protocol activities (default is ories
present dir) /etc/p‐ User account info
traceroute Given an address, will identify
asswd
all of the places your packets cd navigate to another directory
travel to to get to that address /etc/group Group info
pwd Present Working Directory; shows
ping Sends packets to an IP, seeing current directory /etc/s‐ Where passwords are actually
how long it takes to get a hadow kept
cp Copy a file from one place to
response /etc/skel Skeleton, template home
another
dig Queries DNS servers to get directory for copying to make
rm Remove a f: force remove,
info on a domain new home directories
file or ignoring warnings/‐
directory anything. r:
recursive; use this
to delete directories
Directories (cont) Automation and Daemons (cont) Input / Reading Commands (cont)
/etc/syst‐ Daemon config file / setup at For scheduling a command to run dd Reads bytes from a location
emd/system stuff just once
/etc/sysl‐ Configuration for syslog atq Lists commands in the queue that Groups, Users, and Permissions oh my
og.conf logging daemon have been scheduled to run Command Description Parameters
/var/log Where logs are kept atrm Remove a command from the queue passwd For changing and setting
/etc/hosts Configuration for network test For checking files and values; any passwords
hosts yes/no question about our system useradd For adding a new user
/etc/networks Configuration for networks su Switch user
Input / Reading Commands
usermod Modify a user account
Process Commands Command Description Parameters
chown For changing ownership of a
Command Description Parame locate For searching for files file / directory
ter‐ find For searching for files chmod For changing permissions of a
s/Usage
less Text viewer for viewing large file / directory
top Displays and updates lots of files groupadd Add a group
info on running processes
nano Good, simple text editor
prestres Displays current running Syntax & Jargon
vim Complex, powerful text editor
processes as a tree
vimtutor Used for learning vim Symbol Description
fg Foreground; fg %[job
/ Term
cat Concatenate files and print
resume a number]
them to stdout stdin Standard input; the input a
suspended process or fg
command is looking to for what it
or bring one back [process echo Echoes whatever it is given;
should work with. Generally
from the ID] useful for sending text
comes from keyboard; could be a
foreground somewhere
file or something else, if we
bg Background; puts a process head Read first few n: number
redirect stuff
into the background lines of a file of lines to
stdout Standard output; typically is the
and print them read
Note: if you want to put a currently running
console. Can be changed to a file
to stdout
command in the background, use CTRL+Z,
or something if we redirect it.
and then fg & bg tail Read last few n: number
stderr Standard error; where errors are
lines of a file of lines to
kill Kills a command in the
printed to.
and print them read
background
to stdout | Pipe. Used to send output of one
command directly to another like,
Automation and Daemons awk Used for viewing files in
"history | less"
complex ways, like looping
Command Description Parameters
through a file and only looking > Send output of command
systemctl Managing systems/services, in somewhere.
at certain patterns and
particular daemons
columns/rows in a file >> Append output somewhere.
journalctl part of systemd, can be used
>& or Send stdout and stderr
to see logging/errors for
&> somewhere
daemons
2> Send just stderr somewhere
crontab Used for setting up automated
running of commands / scripts
at certain dates or intervals via
cron
1> Send just stdout somewhere whereis Like which but searches a
& Put at the end of a command to broader area than just your
run it in the background, shell's search path
immediately returning console to sort Sorts r: reverses sort order. h:
you. text for sorting human-rea‐
$ When on prompt, means that dable byte counts
you're a regular user ln Used for creating links between
# When on prompt, means that files; shortcuts basically
you're the root user chsh Change shell
? Wildcard character - when a stty Setting key commands (like
command receives '?' in its backspace to delete)
input, it will take that mean to (Use "stty sane" to unbork a borked shell)
any single character
clear Clears terminal of text
* Wildcard for any number of
script Saves everything that comes up
characters. I.e. "*.txt" would
in your console, until exit is
refer to any thing/file ending in
called
".txt"
[abc] Wildcard for given characters
(here, a, b, or c). Can also
define a range, i.e. [1-3]
CTRL+U Delete current line
CTRL+C Abort whatever's currently
running
CTRL+Z Suspend whatever's currently
running
Miscellaneous Commands