20250204将Ubuntu22.04的默认Dash的shell脚本更换为bash
2025/2/4 23:45
百度:dash bash
https://blog.csdn.net/2201_75772333/article/details/136955776
【Linux基础】dash和bash简介
Dash(Debian Almquist Shell)和 Bash(Bourne Again Shell)是 Unix/Linux 系统中的命令行 shell,用于执行命令、管理文件系统、编写脚本等任务的工具。
Dash 作为一个轻量级的 shell,在某些特定的场景下具有优势,尤其是在需要追求速度和资源效率的环境中。然而,在需要更多功能和灵活性的情况下,可能会选择更复杂的 shell,如 Bash。在启动脚本中或需要追求性能的系统中。
五、dash和bash的切换
将Ubuntu shell环境修改为bash,
#选择No,将Ubuntu shell由dash修改为bash
sudo dpkg-reconfigure dash
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~$ ll /bin/sh
lrwxrwxrwx 1 root root 4 2月 3 22:33 /bin/sh -> bash*
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~$
Step 2. Set bash as default shell tool.
$ sudo rm /bin/sh
$ sudo ln -sf /bin/bash /bin/sh