Chinaunix首页 | 论坛 | 博客
  • 博客访问: 532349
  • 博文数量: 75
  • 博客积分: 2374
  • 博客等级: 大尉
  • 技术积分: 933
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-18 14:27
文章分类

全部博文(75)

文章存档

2014年(1)

2013年(17)

2012年(10)

2011年(15)

2010年(23)

2009年(9)

我的朋友

分类: LINUX

2009-11-19 19:54:47

无意间发现Ubuntu的sh默认是指向dash。网上查了一下发现,dash的民意不如bash,据部分网友反映如果用dash编译某些文件,会出现无法编译的情况,但用bash则不会。有些情况下,在脚本中,将#!/bin/bash简写成#!/bin/sh,这个时候用dash编译就会出错了。
 
不管用dash是不是会提高开机速度或者其他什么原因,我先试一下把sh指向bash
 
首先,在终端敲入ls -l /bin/sh,出现
 

lrwxrwxrwx 1 root root 4 2009-08-13 19:31 /bin/sh -> dash


在root下敲入

# dpkg-reconfigure dash

会弹出对话框,选“否”,则切换成功

The default /bin/sh shell on Debian and Debian-based systems is bash. 

However, since the default shell is required to be POSIX-compliant, any shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may wish to do this because dash is faster and smaller than bash.

Install dash as /bin/sh? 

           <>                       <>


 

 

阅读(2409) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~