Questions tagged [systemd]

systemd is a boot sequencer and service manager for Linux systems, with optional facilities for network management, logging, session control and cryptography. It is used by a majority of desktop Linux users, as its adaptiveness to changing hotplug hardware, network connectivity and its support for sandboxing makes it attractive for workstation/laptop use.

systemd is a system and service manager for Linux, compatible with SysV and LSB init scripts. systemd provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux cgroups, supports snapshotting and restoring of the system state, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic. It can work as a drop-in replacement for sysVinit.

More here at http://0pointer.de/blog/projects/systemd.html#faqs

4878 questions
1088
votes
7 answers

How to see full log from systemctl status service?

I check service status with systemctl status service-name . By default, I see few rows only, so I add -n50 to see more. Sometimes, I want to see full log, from start. It could have 1000s of rows. Now, I check it with -n10000 but that doesn't look…
10robinho
  • 11,279
706
votes
16 answers

How to clear journalctl

I couldn't find in google any safe way to clear systemd journal. Do anyone know any safe and reliable way to do so? Let's say I was experimenting with something and my logs got cluttered with various error messages. Moreover I'm displaying my…
Łukasz Zaroda
  • 7,671
  • 4
  • 21
  • 24
332
votes
2 answers

View stdout/stderr of systemd service

I have created a simple systemd service file for a custom application. The application works well when I run it manually, but my CPU gets maxed out when I run it with systemd. I'm trying do track down where my problem is, but I don't know where to…
beatgammit
  • 7,903
299
votes
2 answers

How to write startup script for Systemd?

I have 2 graphics cards on my laptop. One is IGP and another discrete. I've written a shell script to to turn off the discrete graphics card. How can I convert it to systemd script to run it at start-up?
Sharique
  • 3,213
297
votes
12 answers

The "proper" way to test if a service is running in a script

My problem: I'm writing a bash script and in it I'd like to check if a given service is running. I know how to do this manually, with $ service [service_name] status . But (especially since the move to systemd) that prints a whole bunch of text…
Nick S
  • 3,115
239
votes
6 answers

Where do I put my systemd unit file?

I read that there are two folders for unit files (not in user mode). /usr/lib/systemd/system/: units provided by installed packages /etc/systemd/system/: units installed by the system administrator Conflicting with this understanding is the answer…
Jonathan Komar
  • 7,254
  • 8
  • 40
  • 54
224
votes
2 answers

What does "systemctl daemon-reload" do?

I have a service that stopped suddenly. I tried to restart that service but failed and was asked to run: systemctl daemon-reload . What does it exactly do? What is a daemon-reload ?
John
  • 2,341
201
votes
6 answers

What are the pros/cons of Upstart and systemd?

It appears systemd is the hot new init system on the block, same as Upstart was a few years ago. What are the pros/cons for each? Also, how does each compare to other init systems?
tshepang
  • 68,112
186
votes
3 answers

Why do most systemd examples contain WantedBy=multi-user.target?

I have read what is multi-user.target and the systemd documentation , which states that the multi-user.target is a special target. Further, a lot of the systemd examples contain that line. Why do so many example services contain that line? What…
Carl
  • 1,963
185
votes
5 answers

systemctl status shows : "State: degraded"

When I run systemctl status , I get State: degraded at the top, ● x230 State: degraded Jobs: 0 queued Failed: 1 units Since: Wed 2018-05-30 17:09:49 CDT; 3 days ago .... What's going on, and how do I fix it?
Evan Carroll
  • 36,279
182
votes
1 answer

Executing chdir before starting systemd service

Question: Can I kick off a process with systemd and assign that process a working directory of my choosing? I have a service that I want to start with systemd . When that service is being started, I want to be able to assign it a current working…
Mario
  • 2,015
177
votes
2 answers

How does systemd use /etc/init.d scripts?

I just switched to debian jessie, and most things run okay, including my graphical display manager wdm . The thing is, I just don't understand how this works. Obviously my /etc/init.d/wdm script is called, because when I put an early exit in there,…
169
votes
8 answers

journalctl: how to prevent text from truncating in terminal

How can I keep long strings from truncating in terminal? For example if I run journalctl -xn There's a lot of text that I cannot read. I am open to using other programs/tools.
161
votes
7 answers

Cause a script to execute after networking has started?

I am relatively new to systemd and am learning its architecture. Right now, I'm trying to figure out how to cause a custom shell script to run. This script needs to run after the networking layer has started up. I'm running Arch, using systemd as…
mngeek206
  • 3,198
144
votes
12 answers

How to avoid conflicts between dnsmasq and systemd-resolved?

I recently installed dnsmasq to act as DNS Server for my local network. dnsmasq listens on port 53 which is already in use by the local DNS stub listener from systemd-resolved . Just stopping systemd-resolved and then restart it after dnsmasq is…
vic
  • 2,342
1
2 3
…
99 100