20250204将Ubuntu22.04的默认Dash的shell脚本更换为bash

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

相关推荐
码上淘金2 小时前
【Python】Python常用控制结构详解:条件判断、遍历与循环控制
开发语言·python
Brilliant Nemo2 小时前
四、SpringMVC实战:构建高效表述层框架
开发语言·python
格林威3 小时前
Baumer工业相机堡盟工业相机的工业视觉中为什么偏爱“黑白相机”
开发语言·c++·人工智能·数码相机·计算机视觉
橙子199110163 小时前
在 Kotlin 中什么是委托属性,简要说说其使用场景和原理
android·开发语言·kotlin
androidwork4 小时前
Kotlin Android LeakCanary内存泄漏检测实战
android·开发语言·kotlin
学地理的小胖砸4 小时前
【Python 基础语法】
开发语言·python
DanB245 小时前
Java笔记4
java·开发语言·笔记
Dddle16 小时前
C++:this指针
java·c语言·开发语言·c++
studyer_domi6 小时前
Matlab 234-锂电池充放电仿真
开发语言·matlab
yuanpan6 小时前
.net/C#进程间通信技术方案总结
开发语言·c#·.net