Sample Header Ad - 728x90

lsns reports different output based on user running it

0 votes
1 answer
56 views
The output of lsns looks different based on the privilege of the user running it. ubuntu user and root user get different results: ubuntu@ubuntu:~$ lsns NS TYPE NPROCS PID USER COMMAND 4026531834 time 6 134628 ubuntu /lib/systemd/systemd --user 4026531835 cgroup 6 134628 ubuntu /lib/systemd/systemd --user 4026531836 pid 6 134628 ubuntu /lib/systemd/systemd --user 4026531837 user 5 134628 ubuntu /lib/systemd/systemd --user 4026531838 uts 6 134628 ubuntu /lib/systemd/systemd --user 4026531839 ipc 6 134628 ubuntu /lib/systemd/systemd --user 4026531840 net 6 134628 ubuntu /lib/systemd/systemd --user 4026531841 mnt 5 134628 ubuntu /lib/systemd/systemd --user 4026532290 user 1 134689 ubuntu /usr/bin/podman 4026532291 mnt 1 134689 ubuntu /usr/bin/podman ubuntu@ubuntu:~$ ubuntu@ubuntu:~$ ubuntu@ubuntu:~$ sudo lsns NS TYPE NPROCS PID USER COMMAND 4026531834 time 115 1 root /sbin/init 4026531835 cgroup 115 1 root /sbin/init 4026531836 pid 112 1 root /sbin/init 4026531837 user 113 1 root /sbin/init 4026531838 uts 112 1 root /sbin/init 4026531839 ipc 115 1 root /sbin/init 4026531840 net 115 1 root /sbin/init 4026531841 mnt 101 1 root /sbin/init 4026531862 mnt 1 25 root kdevtmpfs 4026532284 mnt 1 414 root /lib/systemd/systemd-udevd 4026532285 uts 1 414 root /lib/systemd/systemd-udevd 4026532286 mnt 1 469 systemd-timesync /lib/systemd/systemd-timesyncd 4026532287 uts 1 469 systemd-timesync /lib/systemd/systemd-timesyncd 4026532288 mnt 1 572 systemd-network /lib/systemd/systemd-networkd 4026532289 mnt 1 608 systemd-resolve /lib/systemd/systemd-resolved 4026532290 user 1 134689 ubuntu /usr/bin/podman 4026532291 mnt 1 134689 ubuntu /usr/bin/podman 4026532292 mnt 1 5369 root /usr/libexec/upowerd 4026532293 user 1 5369 root /usr/libexec/upowerd 4026532295 mnt 2 134974 root unshare --fork --pid --mount-proc /bin/bash 4026532296 pid 2 134975 root /bin/bash 4026532297 mnt 2 134981 root unshare --fork --pid --mount-proc /bin/zsh 4026532298 pid 1 134982 root /bin/zsh 4026532345 uts 1 655 root /lib/systemd/systemd-logind 4026532346 mnt 1 631 root /usr/sbin/irqbalance --foreground 4026532347 mnt 1 655 root /lib/systemd/systemd-logind 4026532348 mnt 1 678 root /usr/sbin/ModemManager ubuntu@ubuntu:~$ Furthemore the name of Ubuntu system's init process is different: systemd vs /sbin/init. What is the reason for this ? Thanks.
Asked by CarloC (385 rep)
Oct 29, 2024, 09:29 AM
Last activity: Oct 31, 2024, 10:34 AM