0

So my Ubuntu 18.04 chroot was not linking /bin to /usr/bin. But my Ubuntu 19.04 chroot was linking /bin to /usr/bin.

root@localhost:/# ls
bin   data  etc   lib    mnt  proc  run   sdcard  sys  usr      boot  dev   home  media  opt  root  sbin  srv     tmp  var
root@localhost:/# ll                                            
total 88
drwx------.  22 root root 4096 Sep  8 10:00 ./                  drwx------.  22 root root 4096 Sep  8 10:00 ../
drwx------.   2 root root 8192 Sep 10 18:17 bin/                drwx------.   2 root root 4096 Apr 24  2018 boot/
drwx------.   3 root root 4096 Sep  8 10:00 data/
drwxr-xr-x.  14 root root 4840 Sep 12 05:44 dev/                drwx------. 101 root root 4096 Sep 12 16:54 etc/
drwx------.   5 root root 4096 Sep  8 09:35 home/
drwx------.  10 root root 4096 Sep 12 16:53 lib/                drwx------.   2 root root 4096 Jul 14 10:58 media/
drwx------.   2 root root 4096 Jul 14 10:58 mnt/                drwx------.   2 root root 4096 Jul 14 10:58 opt/
dr-xr-xr-x. 323 root root    0 Jan  1  1970 proc/               drwxrwxr--.  28 root root 4096 Sep 12 17:13 root/
drwx------.  11 root root 4096 Sep 12 16:53 run/                drwx------.   2 root root 8192 Sep 12 16:53 sbin/
drwxrwx--x.  42 root 1028 4096 Sep  9 09:51 sdcard/             drwx------.   2 root root 4096 Jul 14 10:58 srv/
drwx------.   2 root root 4096 Apr 24  2018 sys/                drwx------.   9 root root 4096 Sep 12 17:33 tmp/
drwx------.  10 root root 4096 Jul 14 10:58 usr/                drwx------.  12 root root 4096 Sep  7 23:25 var/
root@localhost:/#

Because it, i copy all binary commands from /bin to /usr/bin. And i linking the directory, but i get this message:

root@localhost:/# ln /usr/bin -fds /
ln: /bin: cannot overwrite directory
root@localhost:/# ln /usr/bin -fds /
ln: /bin: cannot overwrite directory
root@localhost:/# ln /usr/bin -fd /
ln: /bin: cannot overwrite directory                            root@localhost:/# ln /usr/bin -d /
ln: failed to create hard link '/bin' => '/usr/bin': Operation not permitted
root@localhost:/# ln /usr/bin -ds /                             ln: failed to create symbolic link '/bin': File exists
root@localhost:/# ln /usr/bin/ -ds /
ln: failed to create symbolic link '/bin': File exists          root@localhost:/#

Please an trick for linking /bin to /usr/bin..

  • Why would you want to link /bin to /usr/bin? – vidarlo Sep 12 at 11:54
  • @vidarlo, yes i want link /bin to /usr/bin – Leap of Azzam 17 hours ago
  • But why would you want to do this? What do you want to achieve? – vidarlo 16 hours ago

Your Answer

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

Browse other questions tagged or ask your own question.