Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 1.17 KB

File metadata and controls

26 lines (22 loc) · 1.17 KB

Linux Processes (Level 1) ⚙️

Viewing Processes

  • ps aux — View all running processes (a=all users, u=user oriented, x=no terminal).
  • top — Real-time view of system processes and resource usage.
  • htop — Interactive and colorful process viewer (easier to read than top).
  • jobs — List jobs in the current shell session.

Managing Processes

  • kill <PID> — Send SIGTERM signal to terminate a process by ID (Standard).
  • kill -9 <PID> — Send SIGKILL signal to forcefully kill a process (Use with caution).
  • pkill <name> — Kill processes by name.
  • killall <name> — Kill all processes with a specific name.

Background & Foreground

  • command & — Run a command in the background.
  • Ctrl+Z — Suspend the current foreground process.
  • bg — Resume a suspended job in the background.
  • fg — Bring a background job to the foreground.
  • nohup command & — Run a command that keeps running after logout.

Signals (Common)

  • 1 (SIGHUP) — Reload configuration.
  • 2 (SIGINT) — Interrupt from keyboard (Ctrl+C).
  • 9 (SIGKILL) — Kill immediately (cannot be caught/ignored).
  • 15 (SIGTERM) — Terminate gracefully (default for kill).