linux

File Permissions

linux, sysadmin

File Permissions # File Types # Attribute File Type - A regular file d Directory l Symbolic link c Character special file (streams of bytes like /dev/null) b Block special file (handles data in blocks like HDD or DVD) Examples # Regular file: [root@server1 ~]# ls -l anaconda-ks.cfg -rw-------. ...

GNU Stow

linux, utilities

I use GNU Stow to manage my dotfiles . Resources # Using GNU Stow to manage your dotfiles

Job Control

linux, cli

Job Control # Commands # 202403030918-ps pidof pgrep pstree jobs bg fg Niceness and Priority # 40 niceness values. -20 is highest and 19 is lowest. Default is 0. Child processes inherit niceness of parent. Users can renice processes they own. root can renice any process. nice (1) - run a program with modified scheduling priority renice (1) - alter priority of running processes Print process list with priority and niceness columns: ...

Job Scheduling

linux, sysadmin

Job Scheduling # Job scheduling and execution is taken care of by two service daemons: at (1) - queue, examine, or delete jobs for later execution atd (8) - run jobs queued for later execution cron (8) - daemon to execute scheduled commands crond (8) - daemon to execute scheduled commands [root@server1 ~]# ls -ld /etc/{at,cron}* -rw-r--r--. 1 root root 1 Apr 4 2022 /etc/at.deny drwxr-xr-x. 2 root root 21 Feb 16 09:08 /etc/cron. ...

Linux

linux, os

Linux # Linux CLI Scripting Linux Utilities and Bash Builtins Concepts Performance & Optimization Learning # RHCSA Resources # Unix Admin. Horror Story Summary Misc. # https://suckless.org/

Linux CLI

sysadmin, linux, bash

Notes # Linux File System File Redirection Bash Expansion Tilde Expansion Command Substitution Strings in Bash File Permissions Shell Prompt Archiving and Backup regex Directory Stack Builtins Bash Variables Resources # The Art of Command Line See also # Data Science at the CLI Awesome Shell

Linux Commands

linux, sysadmin, utilities

Linux Commands # adduser alias - Create an alias for a command apropos - Display a list of appropriate commands aspell - Interactive spell checker aspell check textfile Can be used to spell-check specific file types like HTML for example. bc bg - Place a job in the background bzip2 - A block sorting file compressor Similar to gzip but uses different compression algorithm. ...

Linux File System

linux, sysadmin

Linux Filesystem # Linux Directory Structure # FHS Filesystem Hierarchy Standard Common File-Paths # Directory Comments / The root directory /bin Binaries /boot Linux Kernel, initial RAM disk image, boot loader /dev This is a special directory that contains device nodes /etc System-wide config files and init scripts for services /etc/crontab /etc/fstab File system table, lists devices mounted at boot time /etc/passwd Where user accounts are defined /etc/group Where user groups are defined /etc/shadow User’s passwords /home User directories /lib Shared libary files used by core system programs /lost+found Used in case of a partial recovery from a file system corruption event /media Mount points for removalbe media such as USB, CD-ROMs, additional drives /mnt On older Linux systems /mnt is for manually mounted removable devices /opt Optional software /proc Virtual file system maintained by the Linux kernel /root Home directory for root /sbin System binaries /tmp Temporary files created by programs /usr All programs and support files used by regular users /usr/bin Executables installed by Linux Distro /usr/lib Shared libraries for programs in /usr/bin /usr/local Executables not from Linux Distro, usually sysadmin installed /usr/sbin More system administration programs /usr/share All data shared by programs in /usr/bin /usr/share/doc Documentation for packages installed on system /var Where changing data such as databases, spool files, mail, etc /var/log System log files /var/log/messages /var/log/syslog /etc/fstab # Field Contents Description 1 Device Name of device file or label (UUID) associated with device 2 Mount point Directory where device is attached to the file system tree 3 File system type e. ...