shell更改

终端只提示一个$总感觉怪怪的,如何让他显示提示信息呢?
这个是由$PS1系统变量决定的,可以更改这个变量值。如果没有这个变量可能就是目前使用的bash 不支持了,我们要更改shell的类型,使用的命令是:chsh -s shell的绝对路径;
命令演示如下:
1 查看系统支持的shell类型:
$ ls -l /bin/*sh
-rwxr-xr-x 1 root root 822420 2011-04-01 03:26 /bin/bash
-rwxr-xr-x 1 root root 83848 2010-11-15 16:32 /bin/dash
lrwxrwxrwx 1 root root 4 2011-10-15 12:20 /bin/rbash -> bash
lrwxrwxrwx 1 root root 4 2011-10-15 12:20 /bin/sh -> dash
lrwxrwxrwx 1 root root 7 2011-10-15 12:20 /bin/static-sh -> busybox

2 更改shell
$ chsh -s /bin/bash
密码:
$

3 第二步已经完成了shell的更改,但是没有效果。我们可以切换一下用户查看shell是否发生了变化。
$ su - //切换到root用户
密码:
root@scflinux-VirtualBox:~# su scf-linux //切换到scf-linux用户
scf-linux@scflinux-VirtualBox:/root$ cd ..

4 shell 确实变化了。但是我们打开另外一个终端查看 发现shell依然没有修改成功。我们要重启电脑才可以的。
$ shutdown -r now
 
http://ashaochangfu.blog.163.com/blog/static/10425173020124514241478/

你可能感兴趣的:(shell更改)