Chinaunix首页 | 论坛 | 博客
  • 博客访问: 311430
  • 博文数量: 96
  • 博客积分: 230
  • 博客等级: 二等列兵
  • 技术积分: 722
  • 用 户 组: 普通用户
  • 注册时间: 2012-02-13 22:25
个人简介

心安处即吾乡!

文章分类

全部博文(96)

文章存档

2016年(1)

2014年(79)

2013年(7)

2012年(9)

我的朋友

分类: BSD

2014-04-17 20:18:33

A. CSH is default shell under FreeBSD. First, make sure bash is installed. Type bash to see if you can execute bash:

$ bash
If you get command not found error. Use pkg_add command to install bash
# pkg_add -r -v bash

Now to setup bash as shell type chsh command.
chsh -s /path/to/shell {user-name}

chsh changes the user login shell. This determines the name of the user's initial login command. A normal user may only change the login shell for her own account, the super user may change the login shell for any account. To setup bash default shell for user vivek, type command:

$ which bashOutput:
/usr/local/bin/bash

Now change shell:
$ chsh -s /usr/local/bin/bash vivekOutput:

Password

Provide your login password. Verify that shell is changed:
$ grep ^vivek /etc/passwd

You can also edit /etc/passwd file and change shell (you need to login as root user):
# vi /etc/passwdLast filed is shell
From
vivek:x:1000:1000:vivek,,,:/home/vivek:/bin/shTo
vivek:x:1000:1000:vivek,,,:/home/vivek:/usr/local/bin/bash

Save and close the file.



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