I have set up a chroot environment (Ubuntu Jammy). I need to run the nmcli command for some purposes. nmcli depend on NetworkManager.service, but the systemd service isn't allowed in chroot env.

How to make nmcli commands available in chroot?

2 Answers 2


You would need to somehow allow communication with the "host" NetworkManager daemon, so, a dbus-enabling bind mount?

I'm not sure nmcli works without access to the config files in /etc, so that's another bind mount you might need.

I'm either case, running strace -o /tmp/nmcli strace nmcli should tell you what it needs; it's how I figure out what I need to expose to containers.


NetworkManager can be executed with --no-daemon option in background, making the nmcli to work independently of the systemd service :

/usr/sbin/NetworkManager --no-daemon &

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .