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

相关推荐
白露与泡影17 分钟前
Java面试题及答案整理(2026年金九银十最新版,持续更新)
java·开发语言
少控科技21 分钟前
农场设备管理代码(1)
开发语言·c#
❀搜不到22 分钟前
isat-sam分割导出掩码图
开发语言·python
geovindu32 分钟前
java: Memento Pattern
java·开发语言·后端·备忘录模式·行为模式
曾阿伦40 分钟前
Trae CN Python环境调试debug指南
开发语言·python
PPPPickup1 小时前
基础知识差缺补漏-面试版持续更新
java·开发语言
兔兔兔兔11 小时前
记录C++ 3
开发语言·c++
黄鸭部落格ShiYuYuanFang1 小时前
【分享】软考每日一练与解析-计组 8/12
java·开发语言
m0_617493941 小时前
Python 使用 cryptography 实现数据加密与解密
开发语言·python
大白同学4211 小时前
初始Qt——了解Qt背景
开发语言·qt