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

相关推荐
SmartRadio10 分钟前
在CH585M代码中如何精细化配置PMU(电源管理单元)和RAM保留
linux·c语言·开发语言·人工智能·单片机·嵌入式硬件·lora
智慧地球(AI·Earth)41 分钟前
Codex配置问题解析:wire_api格式不匹配导致的“Reconnecting...”循环
开发语言·人工智能·vscode·codex·claude code
Ralph_Y1 小时前
C++虚继承
开发语言·c++
杨章隐1 小时前
Java 解析 CDR 文件并计算图形面积的完整方案(支持 MultipartFile / 网络文件)@杨宁山
java·开发语言
SmartRadio1 小时前
进一步优化CH585M的低功耗模式
c语言·开发语言·单片机·嵌入式硬件·物联网
Renhao-Wan1 小时前
Java 并发基石:AQS (AbstractQueuedSynchronizer)
java·开发语言
SweetCode1 小时前
【无标题】
开发语言·c++·算法
shughui1 小时前
Python基础面试题:语言定位+数据类型+核心操作+算法实战(含代码实例)
开发语言·python·算法
No0d1es1 小时前
2025年12月电子学会青少年软件编程Python六级等级考试真题试卷
开发语言·python·青少年编程·等级考试·电子学会
zlp19921 小时前
xxl-job java.sql.SQLException: interrupt问题排查(二)
java·开发语言