[linux] ubuntu 切换默认的/bin/sh
背景
ubuntu 默认的sh, 也就是/bin/sh默认被切换成了dash,dash体积相对于bash更小,并且性能相对于bash更好, 但是有些情况下,需要默认的/bin/sh 为shell
使用命令
sudo dpkg-reconfigure dash
选择no
输出log
Removing 'diversion of /bin/sh to /bin/sh.distrib by dash'
Adding 'diversion of /bin/sh to /bin/sh.distrib by bash'
Removing 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash'
Adding 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by bash'
$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Aug 19 14:26 /bin/sh -> bash