Delete Set public Set private Add tags Delete tags
  Add tag   Cancel
  Delete tag   Cancel
  • • DevOps notes •
  •  
  • AI
  • Tags
  • Login
6 results tagged sysadmin

Systemctl, process management/shaare/VSEluw

  • RHCSA
  • systemctl
  • process
  • nohup
  • fg
  • bg
  • nice
  • pkill
  • jobs
  • linux
  • shell
  • sysadmin
  • monitoring
  • uptime
  • RHCSA
  • systemctl
  • process
  • nohup
  • fg
  • bg
  • nice
  • pkill
  • jobs
  • linux
  • shell
  • sysadmin
  • monitoring
  • uptime

Basic System Info Commands

  • uptime → time, uptime, users, load average
  • hostname → current hostname
  • ip hostname → show IP & hostname
  • uname -a → current OS and kernel info
  • which command → path to a command
  • cal → calendar for current month/year

    • cal 2025 → full year
  • bc → basic calculator

System Monitoring

  • systemctl → interact with systemd system manager
  • ps → view current processes
  • top → dynamic view of process usage

Systemctl Usage

  • systemctl start|stop|status servicename.service → manage service state
  • systemctl enable servicename.service → start service at boot
  • systemctl restart|reload servicename → restart or reload service
  • systemctl list-units --all → list all units
  • To add a service:

    • Create a unit file in /etc/systemd/system/servicename.service

Process Management

  • Start a process in the background:

    • Ctrl + Z then jobs → suspend and background
    • bg → continue in background
    • fg → bring back to foreground
  • Run process detached from terminal:

    • nohup process & → keep running after logout
    • nohup process > /dev/null 2>&1 & → suppress all logs/output

Killing and Prioritizing

  • pkill name → kill process by name
  • nice → start process with a priority (range -20 to 19)

    • lower = higher priority
    • nice -20 top

Jobs Monitoring

  • jobs → list background/foreground job states
2 weeks ago Permalink
cluster icon
  • Crontab / at : Crontab Basics crontab -e → edit crontab crontab -l → list crontab entries crontab -r → remove crontab entries systemctl status crond → check crond s...
  • Process monitoring : ps Command ps → Current shell process status ps -E → All running processes ps aux → All in BSD style with details ps -EF → Running process with detai...
  • User management : Essential Commands: useradd, groupadd, userdel, groupdel, usermod Modify 3 files: /etc/passwd, /etc/group, /etc/shadow Create User with Custom O...
  • SED: Stream Editor for Text Manipulation : Basic Replace Syntax: sed -i 's/KENNY/LENNY/g' filename Substitute all occurrences of "KENNY" with "LENNY" Delete Line Containing String: s...
  • Vi Editor : Vi Editor Commands i → insert mode I → insert at line start ESC → escape to command mode R → replace mode x → delete character dd → delete line yy → ...

User management/shaare/zyCzng

  • RHCSA
  • sed
  • useradd
  • userdel
  • usermod
  • groupadd
  • groupdel
  • linux
  • shell
  • sysadmin
  • RHCSA
  • sed
  • useradd
  • userdel
  • usermod
  • groupadd
  • groupdel
  • linux
  • shell
  • sysadmin

  • Essential Commands:

    • useradd, groupadd, userdel, groupdel, usermod
    • Modify 3 files: /etc/passwd, /etc/group, /etc/shadow

Create User with Custom Options

useradd -G mygroup -s /bin/bash \
  -c "User Description" -m \
  -d "/home/myuser" myuser

Other Useful User Commands

  • useradd myuser → create user
  • id myuser → check if user exists
  • groupadd → create group
  • cat /etc/group → check group
  • userdel -r myuser → delete user and home directory
  • groupdel mygroup → delete group
  • usermod -G mygroup myuser → change user's group
  • chgrp -R mygroup myuser → change group ownership recursively
  • passwd myuser → set or update user's password

Password Aging with chage

  • chage → manage password aging

    • -m → minimum days
    • -M → maximum days
    • -d → last password change
    • -I → inactive days
    • -E → expiration date
    • -W → warning days
  • Example:

    • chage -M 5 -M 90 -W 10 -I 10 username

Edit Password Policies

  • File: /etc/login.defs

    • PASS_MAX_DAYS 9999
    • PASS_MIN_DAYS 0
    • PASS_MIN_LEN 5
    • PASS_WARN_AGE 7

Switch User Privileges

  • visudo → edit sudo permissions config (/etc/sudoers)

    • Add user to wheel group for sudo access
  • usermod -aG wheel myuser → grant sudo rights

User Info and Monitoring Commands

  • who → see logged in users
  • last → list last login records
  • w → who is logged in with more details
  • finger → show user details
  • id → show UID, GID and groups
  • id myuser → check user info

Send Messages to Users

  • wall → broadcast message to all users

    • Type message, then Ctrl + D to send
  • write myuser → send message to specific user

    • Type message, then Ctrl + D to send
2 weeks ago Permalink
cluster icon
  • SED: Stream Editor for Text Manipulation : Basic Replace Syntax: sed -i 's/KENNY/LENNY/g' filename Substitute all occurrences of "KENNY" with "LENNY" Delete Line Containing String: s...
  • Systemctl, process management : Basic System Info Commands uptime → time, uptime, users, load average hostname → current hostname ip hostname → show IP & hostname uname -a → current...
  • Vi Editor : Vi Editor Commands i → insert mode I → insert at line start ESC → escape to command mode R → replace mode x → delete character dd → delete line yy → ...
  • Crontab / at : Crontab Basics crontab -e → edit crontab crontab -l → list crontab entries crontab -r → remove crontab entries systemctl status crond → check crond s...
  • File Display Commands / Filters / Text Processing Input : File Display Commands cat → Show entire content cat -A → Show non-printable characters more → Paginate output less → Same as more but allows navigatio...

SED: Stream Editor for Text Manipulation/shaare/Uadn6w

  • RHCSA
  • sed
  • linux
  • shell
  • sysadmin
  • text_editing
  • commandline
  • text_processing
  • RHCSA
  • sed
  • linux
  • shell
  • sysadmin
  • text_editing
  • commandline
  • text_processing

  • Basic Replace Syntax:

    • sed -i 's/KENNY/LENNY/g' filename

    • Substitute all occurrences of "KENNY" with "LENNY"

  • Delete Line Containing String:

    • sed -i '/SEINFELD/d' filename
  • Delete Empty Lines:

    • sed -i '/^$/d' filename
  • Delete First Line:

    • sed '1d' filename
  • sed '1,2d' filename → delete the first two lines

  • sed 's/\t/ /g' filename → replace tabs with spaces

  • sed -n '12,18p' filename → print only lines 12 to 18

  • sed '12,18d' filename → delete lines 12 to 18

  • sed G filename → insert an empty line after every line

  • sed '8!s/seinfeld/S1/' filename → replace "seinfeld" with "S1" on every line except line 8

2 weeks ago Permalink
cluster icon
  • Vi Editor : Vi Editor Commands i → insert mode I → insert at line start ESC → escape to command mode R → replace mode x → delete character dd → delete line yy → ...
  • User management : Essential Commands: useradd, groupadd, userdel, groupdel, usermod Modify 3 files: /etc/passwd, /etc/group, /etc/shadow Create User with Custom O...
  • Crontab / at : Crontab Basics crontab -e → edit crontab crontab -l → list crontab entries crontab -r → remove crontab entries systemctl status crond → check crond s...
  • Systemctl, process management : Basic System Info Commands uptime → time, uptime, users, load average hostname → current hostname ip hostname → show IP & hostname uname -a → current...
  • File Display Commands / Filters / Text Processing Input : File Display Commands cat → Show entire content cat -A → Show non-printable characters more → Paginate output less → Same as more but allows navigatio...

Vi Editor/shaare/ucFNUQ

  • RHCSA
  • vi
  • linux
  • shell
  • sysadmin
  • text_editing
  • commandline
  • RHCSA
  • vi
  • linux
  • shell
  • sysadmin
  • text_editing
  • commandline

Vi Editor Commands

  • i → insert mode
  • I → insert at line start
  • ESC → escape to command mode
  • R → replace mode
  • x → delete character
  • dd → delete line
  • yy → copy line
  • p → paste
  • v → visual mode
  • o → open new line below and insert
  • O → open new line above and insert
  • a → append after cursor
  • A → append at end of line
  • :q! → quit without saving
  • :wq or ZZ → save and quit
2 weeks ago Permalink
cluster icon
  • SED: Stream Editor for Text Manipulation : Basic Replace Syntax: sed -i 's/KENNY/LENNY/g' filename Substitute all occurrences of "KENNY" with "LENNY" Delete Line Containing String: s...
  • Crontab / at : Crontab Basics crontab -e → edit crontab crontab -l → list crontab entries crontab -r → remove crontab entries systemctl status crond → check crond s...
  • User management : Essential Commands: useradd, groupadd, userdel, groupdel, usermod Modify 3 files: /etc/passwd, /etc/group, /etc/shadow Create User with Custom O...
  • Systemctl, process management : Basic System Info Commands uptime → time, uptime, users, load average hostname → current hostname ip hostname → show IP & hostname uname -a → current...
  • File Display Commands / Filters / Text Processing Input : File Display Commands cat → Show entire content cat -A → Show non-printable characters more → Paginate output less → Same as more but allows navigatio...

Crontab / at/shaare/pyrX4g

  • RHCSA
  • cron
  • at
  • linux
  • shell
  • sysadmin
  • commandline
  • crontab
  • RHCSA
  • cron
  • at
  • linux
  • shell
  • sysadmin
  • commandline
  • crontab

Crontab Basics

  • crontab -e → edit crontab
  • crontab -l → list crontab entries
  • crontab -r → remove crontab entries
  • systemctl status crond → check crond service status

AT: One-time Scheduled Tasks

  • Used to schedule jobs only once.

Scheduling Examples:

  • at HH:MM PM → schedule a job interactively
  • at 11:23AM 12/24/25

    • Enter job (e.g., echo "test") and press Ctrl + D to finish
  • at 2:45PM 01/30/25
  • at 4PM + 4 days
  • at now + 5 hours
  • at 8:00AM Sun
  • at 10:00AM next month

Managing AT Jobs

  • atq → list the scheduled at jobs
  • atrm # → remove a specific at job (use number from atq)
  • systemctl status atd → check atd daemon status
2 weeks ago Permalink
cluster icon
  • Vi Editor : Vi Editor Commands i → insert mode I → insert at line start ESC → escape to command mode R → replace mode x → delete character dd → delete line yy → ...
  • SED: Stream Editor for Text Manipulation : Basic Replace Syntax: sed -i 's/KENNY/LENNY/g' filename Substitute all occurrences of "KENNY" with "LENNY" Delete Line Containing String: s...
  • Systemctl, process management : Basic System Info Commands uptime → time, uptime, users, load average hostname → current hostname ip hostname → show IP & hostname uname -a → current...
  • User management : Essential Commands: useradd, groupadd, userdel, groupdel, usermod Modify 3 files: /etc/passwd, /etc/group, /etc/shadow Create User with Custom O...
  • Linux filesystem : /boot -> Grub.cfg /root -> home of root /dev -> system device (mouse, keyboard) /etc -> configuration files /bin -> /usr/bin -> everyday user commands...

Linux filesystem/shaare/WhCZtQ

  • RHCSA
  • linux
  • sysadmin
  • red_hat
  • filesystem
  • RHCSA
  • linux
  • sysadmin
  • red_hat
  • filesystem

/boot -> Grub.cfg
/root -> home of root
/dev -> system device (mouse, keyboard)
/etc -> configuration files
/bin -> /usr/bin -> everyday user commands
/sbin -> /usr/sbin -> system/filesystem commands
/opt -> third party app (not part of os)
/proc -> running process (only in memory)
/lib -> /usr/lib -> C prog lib
/tmp -> temporary folder
/home -> user dir
/var -> system logs
/run -> system daemon -> store temporary runtime / PID file
/mnt -> mount external file system
/media -> CDrom

2 weeks ago Permalink
cluster icon
  • Vi Editor : Vi Editor Commands i → insert mode I → insert at line start ESC → escape to command mode R → replace mode x → delete character dd → delete line yy → ...
  • SED: Stream Editor for Text Manipulation : Basic Replace Syntax: sed -i 's/KENNY/LENNY/g' filename Substitute all occurrences of "KENNY" with "LENNY" Delete Line Containing String: s...
  • User management : Essential Commands: useradd, groupadd, userdel, groupdel, usermod Modify 3 files: /etc/passwd, /etc/group, /etc/shadow Create User with Custom O...
  • Linux File Links and Permissions : Links Soft Link (Symbolic Link) ln -s Link will be removed if the original file is removed or renamed. Hard Link ln Deleting, renaming, or moving t...
  • Systemctl, process management : Basic System Info Commands uptime → time, uptime, users, load average hostname → current hostname ip hostname → show IP & hostname uname -a → current...


(14)
Links per page
  • 20
  • 50
  • 100
Filter untagged links
Fold Fold all Expand Expand all Are you sure you want to delete this link? Are you sure you want to delete this tag? The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community