macbook pro 15寸教育优惠怎么购买

2014年6月 Linux/Unix社区大版内专家分月排行榜第二2014年1月 Linux/Unix社区大版内专家分月排行榜第二2013年11月 Linux/Unix社区大版内专家分月排行榜第二2010年6月 Windows专区大版内专家分月排行榜第二2010年4月 Windows专区大版内专家分月排行榜第二2010年3月 Windows专区大版内专家分月排行榜第二2009年12月 Windows专区大版内专家分月排行榜第二2009年11月 Windows专区大版内专家分月排行榜第二2008年7月 Windows专区大版内专家分月排行榜第二2008年1月 Windows专区大版内专家分月排行榜第二2007年12月 Windows专区大版内专家分月排行榜第二2007年11月 Windows专区大版内专家分月排行榜第二2007年10月 Windows专区大版内专家分月排行榜第二2007年6月 Windows专区大版内专家分月排行榜第二
2014年7月 Linux/Unix社区大版内专家分月排行榜第三2014年4月 Linux/Unix社区大版内专家分月排行榜第三2013年1月 Linux/Unix社区大版内专家分月排行榜第三2010年5月 Windows专区大版内专家分月排行榜第三2009年9月 Windows专区大版内专家分月排行榜第三2009年8月 Windows专区大版内专家分月排行榜第三2008年8月 Windows专区大版内专家分月排行榜第三2008年6月 Windows专区大版内专家分月排行榜第三2007年9月 Windows专区大版内专家分月排行榜第三2007年7月 Windows专区大版内专家分月排行榜第三2007年4月 Windows专区大版内专家分月排行榜第三
2013年5月 Linux/Unix社区大版内专家分月排行榜第三2012年10月 Linux/Unix社区大版内专家分月排行榜第三2012年7月 Linux/Unix社区大版内专家分月排行榜第三2011年12月 Linux/Unix社区大版内专家分月排行榜第三
2013年5月 Linux/Unix社区大版内专家分月排行榜第三2012年10月 Linux/Unix社区大版内专家分月排行榜第三2012年7月 Linux/Unix社区大版内专家分月排行榜第三2011年12月 Linux/Unix社区大版内专家分月排行榜第三
本帖子已过去太久远了,不再提供回复功能。微信公众号
Linux中设定您的默认Shell
如果能够拥有root权限,可以直接修改 /etc/passwd 文件。找到您用户ID起始的行
user:x::user,,,:/home/user:/bin/bash
最后一个字段为登录后的默认Shell, /bin/bash 是程序 bash 的主程序路径。 fish 主程序的路径通常为 /usr/bin/fish 。
/etc/shells 中列出系统中所有可用Shell( /bin/false 代表禁用Shell)
也可以使用如下命令更改您的默认Shell
chsh -s /usr/bin/fish
(需要输入您的密码)
Tip:可以使用 whereis xxx 命令,来查找 xxx 程序的安装位置,详见搜索。
其他类似的新闻
● ● ● ● ● ● ● ● ● ●
其他相关的新闻
大家感兴趣的内容
小伙伴最爱的新闻
小伙伴还关注了以下信息
小伙伴关注的焦点
小伙伴都在关注的热门词
Copyright (C) 2006- Inc. All Rights Reserved
孝感风信信息技术有限公司 ● 版权所有如何修改Linux账户的默认Shell类型?
作者:佚名
字体:[ ] 来源:互联网 时间:04-04 14:32:06
近日,有些朋友问如何修改Linux账户的默认Shell类型?今天小编为大家分享的是修改Linux账户的默认Shell类型的方法,有需要的朋友可以参考下
当我新建了一个账号,发现登录后很不习惯。
原来系统给我的shell不是是sh,我都是用bash的,这可怎么办来?
当然可以使用
来切换,但是这个方法治标不治本。
每个账户登录后所启动的默认shell是保存在/etc/passwd 中的
可以使用cat来查看
$cat /etc/passwd
root:x:0:0:root:/root:/bin/sh
#我怎么可能让你知道我的账户
如果需要修改成我喜欢的bash
$ls -l /etc/passwd
-rw-r--r-- 1 root root -29 09:42 /etc/passwd
只有root可写,只能用root权限去修改了
$sudo vim /etc/passwd
将自己账户对应的那行最后部分
由改为/bin/sh修改为/bin/bash
保存重新登录账户即可。
大家感兴趣的内容
12345678910
最近更新的内容博客访问: 2066932
博文数量: 431
博客积分: 12926
博客等级: 上将
技术积分: 4563
注册时间:
IT168企业级官微
微信号:IT168qiye
系统架构师大会
微信号:SACC2013
分类: LINUX
查看用户当前shell。bigfish@wangyu-desktop:~ $ echo $SHELL&&&&&&&&&&&&& /bin/bash/etc/passwd记录着用户的一些信息,其中最后是用户默认的shell。bigfish@wangyu-desktop:~ $ cat /etc/passwdroot:x:0:0:root:/root:/bin/shdaemon:x:1:1:daemon:/usr/sbin:/bin/shbin:x:2:2:bin:/bin:/bin/shsys:x:3:3:sys:/dev:/bin/shsync:x:4:65534:sync:/bin:/bin/syncgames:x:5:60:games:/usr/games:/bin/shman:x:6:12:man:/var/cache/man:/bin/shlp:x:7:7:lp:/var/spool/lpd:/bin/shmail:x:8:8:mail:/var/mail:/bin/shnews:x:9:9:news:/var/spool/news:/bin/shuucp:x:10:10:uucp:/var/spool/uucp:/bin/shproxy:x:13:13:proxy:/bin:/bin/shwww-data:x:33:33:www-data:/var/www:/bin/shbackup:x:34:34:backup:/var/backups:/bin/shlist:x:38:38:Mailing List Manager:/var/list:/bin/shirc:x:39:39:ircd:/var/run/ircd:/bin/shgnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/shnobody:x::nobody:/nonexistent:/bin/shlibuuid:x:100:101::/var/lib/libuuid:/bin/shdhcp:x:101:102::/nonexistent:/bin/falsesyslog:x:102:103::/home/syslog:/bin/falseklog:x:103:104::/home/klog:/bin/falsehplip:x:104:7:HPLIP system user,,,:/var/run/hplip:/bin/falseavahi-autoipd:x:105:113:Avahi autoip daemon,,,:/var/lib/avahi-autoipd:/bin/falsegdm:x:106:114:Gnome Display Manager:/var/lib/gdm:/bin/falsepulse:x:107:116:PulseAudio daemon,,,:/var/run/pulse:/bin/falsemessagebus:x:108:119::/var/run/dbus:/bin/falseavahi:x:109:120:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/falsepolkituser:x:110:122:PolicyKit,,,:/var/run/PolicyKit:/bin/falsehaldaemon:x:111:123:Hardware abstraction layer,,,:/var/run/hald:/bin/falseDebian-exim:x:112:124::/var/spool/exim4:/bin/falsesshd:x:113:65534::/var/run/sshd:/usr/sbin/nologinbigfish:x::bigfish,,,,:/home/bigfish:/bin/bash&& //这里的用户是我注册的tftpd:x:::/home/tftpd:/bin/falseusermod -s 指定shell& 指定用户bigfish@wangyu-desktop:~ $ sudo usermod -s /bin/sh bigfish[sudo] password for bigfish: 再次查看/etc/passwd文件,查看是否默认shell已经修改成我所需要的。bigfish@wangyu-desktop:~ $ cat /etc/passwdroot:x:0:0:root:/root:/bin/shdaemon:x:1:1:daemon:/usr/sbin:/bin/shbin:x:2:2:bin:/bin:/bin/shsys:x:3:3:sys:/dev:/bin/shsync:x:4:65534:sync:/bin:/bin/syncgames:x:5:60:games:/usr/games:/bin/shman:x:6:12:man:/var/cache/man:/bin/shlp:x:7:7:lp:/var/spool/lpd:/bin/shmail:x:8:8:mail:/var/mail:/bin/shnews:x:9:9:news:/var/spool/news:/bin/shuucp:x:10:10:uucp:/var/spool/uucp:/bin/shproxy:x:13:13:proxy:/bin:/bin/shwww-data:x:33:33:www-data:/var/www:/bin/shbackup:x:34:34:backup:/var/backups:/bin/shlist:x:38:38:Mailing List Manager:/var/list:/bin/shirc:x:39:39:ircd:/var/run/ircd:/bin/shgnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/shnobody:x::nobody:/nonexistent:/bin/shlibuuid:x:100:101::/var/lib/libuuid:/bin/shdhcp:x:101:102::/nonexistent:/bin/falsesyslog:x:102:103::/home/syslog:/bin/falseklog:x:103:104::/home/klog:/bin/falsehplip:x:104:7:HPLIP system user,,,:/var/run/hplip:/bin/falseavahi-autoipd:x:105:113:Avahi autoip daemon,,,:/var/lib/avahi-autoipd:/bin/falsegdm:x:106:114:Gnome Display Manager:/var/lib/gdm:/bin/falsepulse:x:107:116:PulseAudio daemon,,,:/var/run/pulse:/bin/falsemessagebus:x:108:119::/var/run/dbus:/bin/falseavahi:x:109:120:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/falsepolkituser:x:110:122:PolicyKit,,,:/var/run/PolicyKit:/bin/falsehaldaemon:x:111:123:Hardware abstraction layer,,,:/var/run/hald:/bin/falseDebian-exim:x:112:124::/var/spool/exim4:/bin/falsesshd:x:113:65534::/var/run/sshd:/usr/sbin/nologinbigfish:x::bigfish,,,,:/home/bigfish:/bin/sh&& 已经修改成/bin/shtftpd:x:::/home/tftpd:/bin/falsebigfish@wangyu-desktop:~ $
阅读(11020) | 评论(1) | 转发(0) |
相关热门文章
给主人留下些什么吧!~~
请登录后评论。什么是默认登录shell?怎么改变指定用户登录shell方法 - 维维软件园
什么是默认登录shell?怎么改变指定用户登录shell方法
来源:本站整理作者:佚名时间: 8:27:48(0)
Linux操作系统下什么是默认登录shell?怎么改变指定用户登录shell方法详解。
在Linux操作系统中,&/bin/bash&是默认的登录shell,它是在创建用户时分配的。使用chsh命令能够改变默认的shell。比如下面的示例:
# chsh &username& -s &new_default_shell&
# chsh linuxtechi -s /bin/sh
大家还看了:
[访问统计:]
上一篇:下一篇:

我要回帖

更多关于 mac mini 2017 的文章

 

随机推荐