0Pricing
Ethical Hacking Academy · Lesson

User and Process Management

ps, kill, sudo.

User and Process Management is a free Ethical Hacking Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Ethical Hacking Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Users and Processes

Linux is multi-user and multitasking. Knowing who is logged in and what is running is vital both for administration and for assessing a compromised host.

This lesson covers identity, processes, signals, and privilege with ps, kill, and sudo.

Who Am I

First, confirm your identity and group memberships. After landing on a target, this tells you what you can do.

whoami
id
groups

Listing Users

Local accounts live in /etc/passwd. Each line lists username, UID, home directory, and shell. UID 0 is root.

cat /etc/passwd
awk -F: '$3 == 0 {print $1}' /etc/passwd   # who is root

Viewing Processes

ps lists running processes. The common form shows every process with full detail.

ps aux
ps aux | grep ssh

Live Process Monitoring

top and htop show processes updating in real time, sorted by CPU or memory. Great for spotting suspicious or resource-heavy programs.

top
# press q to quit; htop is a friendlier alternative

Process IDs

Every process has a unique PID. You target a process by its PID. Find it quickly with pgrep.

pgrep -a apache2
ps -p 1337 -o pid,cmd

Killing Processes

kill sends a signal to a process. By default that is TERM (graceful). Use -9 (KILL) to force-stop a stubborn process.

kill 1337        # polite TERM
kill -9 1337     # force KILL
pkill firefox    # by name

Common Signals

Signals control process behavior:

  • SIGTERM (15) - ask to stop gracefully.
  • SIGKILL (9) - force immediate termination.
  • SIGHUP (1) - often reloads config.
  • SIGSTOP / SIGCONT - pause and resume.

sudo

sudo runs a command as another user, usually root, if your account is permitted. It is the standard way to perform admin tasks without logging in as root.

sudo apt update
sudo cat /etc/shadow

Checking sudo Rights

After gaining a shell, checking sudo permissions is a top privilege escalation step. sudo -l lists what the current user may run as root.

A misconfigured entry (like running an editor or interpreter as root) often leads straight to a root shell.

sudo -l

Background Jobs

Append & to run a command in the background. Manage these jobs and reattach them in your shell.

long_scan.sh &
jobs
fg %1     # bring job 1 to foreground

Quick Check

Recall the privesc enumeration command.

Recap

You learned to inspect identity and control processes:

  • whoami, id, /etc/passwd for users.
  • ps aux, top, pgrep to view processes.
  • kill / signals (TERM 15, KILL 9) to stop them.
  • sudo -l reveals privilege-escalation opportunities.

Next: networking commands.

Frequently asked questions

Is the “User and Process Management” lesson free?

Yes — the full text of “User and Process Management” is free to read here on the web, and the Ethical Hacking Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Ethical Hacking Academy course, upgrade to CoddyKit PRO.

What will I learn in “User and Process Management”?

ps, kill, sudo. You practise Ethical Hacking Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Ethical Hacking Academy?

No prior experience is required. Ethical Hacking Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “User and Process Management” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Ethical Hacking Academy lesson?

Yes. Every Ethical Hacking Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. The Linux File System
  2. Essential Commands
  3. User and Process Management
  4. Networking Commands
← Back to Ethical Hacking Academy