What is journald and how do you query logs?
BeginnerConceptProcesses, Signals & systemd
Answer
journald collects stdout/stderr of units, syslog messages and kernel logs into an indexed binary journal.
journalctl -u nginx -f # follow a unit
journalctl -u api --since "1 hour ago" -p err
journalctl -b -1 -e # previous boot, jump to end
journalctl _PID=1234
journalctl -o json-pretty -n 5
More on Processes, Signals & systemd
What is the difference between a program, a process and a thread?BeginnerHow are new processes created in Linux?IntermediateWhat is a zombie process, and how do you get rid of it?IntermediateWhat is an orphan process?BeginnerExplain the process states shown in ps (R, S, D, T, Z).IntermediateWhy can't you kill a process in D state?Advanced