diff --git a/2024/02/20/linux-common-command/index.html b/2024/02/20/linux-common-command/index.html index cba15fc..f4d5e1e 100644 --- a/2024/02/20/linux-common-command/index.html +++ b/2024/02/20/linux-common-command/index.html @@ -27,7 +27,7 @@ - + @@ -189,7 +189,7 @@
journalctl --follow --no-tail
is used when you want all previous lines (better than -n 100000 or arbitrary big line count)
TLDR; Use the one liner: - System level: 1
journalctl _SYSTEMD_INVOCATION_ID=`systemctl show -p InvocationID --value service_name.service`
1
journalctl _SYSTEMD_INVOCATION_ID=`systemctl show -p InvocationID --value service_name.service --user`
TL;DR: Use the one liner: - System level: 1
journalctl _SYSTEMD_INVOCATION_ID=`systemctl show -p InvocationID --value service_name.service`
1
journalctl _SYSTEMD_INVOCATION_ID=`systemctl show -p InvocationID --value service_name.service --user`
Create a systemd Service File: Create a .service file (e.g., my_server.service) in a location of your choice (usually /etc/systemd/system/
for system-level services or ~/.config/systemd/user/
for user-level services). Open the file for editing.
Define the Service:
diff --git a/index.html b/index.html index ea95a57..d44d4af 100644 --- a/index.html +++ b/index.html @@ -185,7 +185,7 @@journalctl --follow --no-tail
is used when you want all previous lines (better than -n 100000 or arbitrary big line count)
TLDR; Use the one liner: - System level: 1
journalctl _SYSTEMD_INVOCATION_ID=`systemctl show -p InvocationID --value service_name.service`
1
journalctl _SYSTEMD_INVOCATION_ID=`systemctl show -p InvocationID --value service_name.service --user`
TL;DR: Use the one liner: - System level: 1
journalctl _SYSTEMD_INVOCATION_ID=`systemctl show -p InvocationID --value service_name.service`
1
journalctl _SYSTEMD_INVOCATION_ID=`systemctl show -p InvocationID --value service_name.service --user`
Create a systemd Service File: Create a .service file (e.g., my_server.service) in a location of your choice (usually /etc/systemd/system/
for system-level services or ~/.config/systemd/user/
for user-level services). Open the file for editing.
Define the Service: