Skip to content

Instantly share code, notes, and snippets.

@afro-coder
Created June 1, 2022 08:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save afro-coder/f80f322ae7be61ea0c42969f51f9df3d to your computer and use it in GitHub Desktop.
Save afro-coder/f80f322ae7be61ea0c42969f51f9df3d to your computer and use it in GitHub Desktop.
Journald Commands

Systemd

Enabling a service and starting it

systemctl enable --now httpd
systemctl enable httpd

Making the journal persistent

# mkdir /var/log/journal
# systemctl restart systemd-journald

Few Journalctl commands

journalctl --since=today
journalctl -g eth0 
journalctl -t httpd

Yum package manager

Finding what package does a command belong to

yum whatprovides dig

Dns

NXDOMAIN => Domain Doesn't exist status: NOERROR => Query suceeded.

; <<>> DiG 9.11.36-RedHat-9.11.36-3.el8 <<>> asdsadas.google.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 9265 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment