To find out what processes are running in the background on a Linux system, you can use the ps
command with the -ef
flags. The ps
command is used to display the status of current processes, and the -ef
flags tell the ps
command to display the full command line of each process, along with the PID (process ID) and the TTY (terminal) associated with each process.
For example:
$ ps -ef UID PID PPID C STIME TTY TIME CMD root 1 0 0 Jan01 ? 00:00:01 /sbin/init root 2 0 0 Jan01 ? 00:00:00 [kthreadd] root 3 2 0 Jan01 ? 00:00:00 [ksoftirqd/0] root 5 2 0 Jan01 ? 00:00:00 [kworker/0:0H] root 7 2 0 Jan01 ? 00:00:00 [rcu_sched] root 8 2 0 Jan01 ? 00:00:00 [rcu_bh] root 9 2 0 Jan01 ? 00:00:00 [migration/0] root 10 2 0 Jan01 ? 00:00:00 [watchdog/0] root 11 2 0 Jan01 ? 00:00:00 [kdevtmpfs] root 12 2 0 Jan01 ? 00:00:00 [netns] root 13 2 0 Jan01 ? 00:00:00 [perf] root 14 2 0 Jan01 ? 00:00:00 [khungtaskd] root 15 2 0 Jan01 ? 00:00:00 [writeback] root 16 2 0 Jan01 ? 00:00:00 [ksmd] root