Delete Set public Set private Add tags Delete tags
  Add tag   Cancel
  Delete tag   Cancel
  • • DevOps notes •
  •  
  • AI
  • Tags
  • Login

Systemctl, process management/shaare/3AAXTQ

  • linux
  • linux

Basic System Info Commands

  • uptime → time now, up since, numbers of users, load average
  • hostname → 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 → see 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
8 months ago Permalink
cluster icon
  • Bash : First Line of Script #!/bin/bash → defines the shell interpreter Comments Use # for commenting Common Elements Commands: echo, cp, etc. Statement...
  • Podman and Docker : Containers → Podman Podman → manage pods and container images Buildah → building/pushing/signing container images Skopeo → copy/inspect/delete/signin...
  • Firewall : Enable firewall firewall-config → GUI for options add ports firewall-cmd → CLI cat /etc/sysconfig/iptables-config cat /etc/firewalld/firewalld.co...
  • 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...
  • Apache and Nginx : Apache Web Server dnf install httpd nano /etc/httpd/conf/httpd.conf nano /var/www/html/index.html systemctl restart httpd systemctl stop firewalld N...


(97)
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