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

相关推荐
五行星辰44 分钟前
用 Java 轻松读取 Word 文档内容
java·开发语言·word
mqwguardain1 小时前
Python连接不同数据库的总结
开发语言·数据库·python
IT猿手1 小时前
离散浣熊优化算法(DCOA)求解大规模旅行商问题(Large-Scale Traveling Salesman Problem,LTSP),MATLAB代码
开发语言·深度学习·算法·机器学习·matlab
Mr.kanglong2 小时前
【C++】C++11
开发语言·c++
大厂在职_QKT2 小时前
C中静态库和动态库的使用
c语言·开发语言
优联前端3 小时前
Web 音视频(四)在浏览器中处理音频
开发语言·javascript·音视频·优联前端·webav·webcodecs
羚羊角uou3 小时前
【C++】多态详细讲解
开发语言·c++
利刃大大4 小时前
【C++】string类的模拟实现
开发语言·c++
数据小小爬虫4 小时前
利用 Python 爬虫获取按关键字搜索淘宝商品的完整指南
开发语言·爬虫·python