Pcornel
Linux · Linux Fundamentals

User Space

Cheat sheet · https://pcornel.dk/topic.php?topic=2652

Back to the Topic

Answer

User space is everything outside the kernel: the init system (systemd), libraries such as glibc, shells, daemons and applications. Each runs as a process with a user ID and limited privileges.

Remember

A process's view depends on its user, environment, working directory, namespaces and limits. A program that works in your shell but fails as a service usually differs in one of those — compare them.

First checks

  • ps -eo pid,user,comm — processes and their users
  • cat /proc/<pid>/environ | tr '\0' '\n' — a running process's environment
  • ls -l /proc/<pid>/cwd — its working directory
  • cat /proc/<pid>/limits — its resource limits
  • ldd <binary> — libraries it loads

Verify in this order

process started by systemd or a shell → runs as a user with an environment and limits → loads libraries → makes system calls

Where it usually breaks

First mismatch in persistent intent → provider/parser/generator → kernel/userspace runtime → dependency/security context → logs/counters → consumer-visible read-back; preserve identity/native diagnostic/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2652

Confirmation

Confirm action

Continue?