Filesystem
-
Filesystem hierarchy
man hier
File descriptor (opens in a new tab)
-
Standard streams and its file descriptors
stdin: 0
stdout: 1
stderr: 2
-
>
by default redirectsstdout
, therefore>
is equivalent to1>
-
>&<FILE_DESCRIPTOR>
redirectsstdout
to another stream.echo "An error occurred" >&2 # Redirect stdout to stderr
-
&>
, To redirect to eitherstdout
orstderr
, depending on the runtime outcomeif cmp a b &> /dev/null # Suppress output whether it's from stdout or stderr
Partition management
Partition Scheme
-
/swap
-
What's the right amount of swap space for a modern Linux system? (opens in a new tab)
-
Usage
- Hibernation
- Memory overflow
-
-
/var
-
Could assign
500GB
if possible -
Usage
-
Application installation
/var/lib/flatpak
/var/lib/snapd
-
Docker storage, cache, volumes, etc
/var/lib/docker
-
-
-
The order of partitions matters, and partitions should be created from the least possible to be resized to the most possible to be resized.
-
Resources
Red Hat family
Fedora
Upgrading Fedora Linux Using DNF System Plugin
Install application and add desktop shortcut
RHEL
RHEL - Subscription Management
-
Use username/password to register a system
subscription-manager register --username $username --password $password --auto-attach
If doesn't work, use activation key and organization ID
subscription-manager register --org $organization_id --activationkey $activation_key
-
Red Hat Customer Portal - Creating Red Hat Customer Portal Activation Keys (opens in a new tab)
RHEL - Flatpak
Package management - EPEL
-
Extra Packages for Enterprise Linux (EPEL) (opens in a new tab)
-
Oracle Linux
-
dnfi oracle-epel-release-el9
Oracle Linux 9
-