I started using linux yesterday and I'm trying to get a feel for the operating system. I've recently tried to download and install google chrome but upon launch I get this error:

Error: /etc/machine-id contains 0 characters (32 were expected).

To solve this I tried to create a symlink to my machine-id using the following: ln -s /var/lib/dbus/machine-id /etc/machine-id but this results in this error:

ln: failed to create symbolic link '/etc/machine-id': File exists

I've tried unlinking and reinstating the link using sudo commands but get the same error. I've also seen others posts saying it may be due to the ordering of my symlink but I believe I've done that correctly.

Can someone help please?


The /etc/machine-id is a unique ID that usually gets created during your system installation and persists across the whole lifetime of your system. It looks like yours is empty for whatever reason.

You can generate a new random ID with the systemd-machine-id-setup command. You will probably also need to make sure the D-Bus machine ID correctly links to it again too, as you say you have messed around with that in an attempt to fix it:

sudo systemd-machine-id-setup
sudo ln -sf /etc/machine-id /var/lib/dbus/machine-id

After that, /etc/machine-id should contain a 32 character hexadecimal string, and /var/lib/dbus/machine-id should be a symlink to that same file.

| improve this answer | |
  • Thank you, I'm unsure as to why I didn't have an ID but that's exactly what I needed! – dompb Jun 11 '19 at 16:08
  • Cool. Please consider accepting the answer if it fully solved your question, by clicking the check mark on the left. – Byte Commander Jun 11 '19 at 16:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.