Advanced · Management Services
journalctl: View service logs
Syntax
journalctl [-u nginx] [-n rows] [-f]Options
-u- View by teaching services
-n- Number of last lines
-f- Teaching Snapshot
Examples
journalctl -u nginx -n 1Usage and sandbox support
Only the teaching nginx log is shown; the real -f will continue to follow.
Hands-on exercises
Related commands
systemctlQuery and Management systemd ServicesaptManage Debian/Ubuntu packagescrontabSchedule periodic tasksdockerManage containersserviceManage traditional serviceshostnamectlQuery or set hostnametimedatectlQuery time and time zoneloginctlQuery login sessionatSchedule one-time tasksdpkgQuery Debian packageapt-cacheQuery APT package metadataapt-getManage APT package in scriptdnfManage Fedora packagesyumManagement RPM series software packagesrpmQuery RPM packagepacmanManage Arch packagesapkManage Alpine packagespodmanManage containers and imageskubectlManage Kubernetes resourcesnginxCheck Web service configurationlogrotateRotate log files