首页 > 系统相关 >Linux chsh命令

Linux chsh命令

时间:2023-04-16 12:22:37浏览次数:49  
标签:bin shell csh 命令 Linux Changing chsh

Linux chsh命令

Linux chsh命令用于更改使用者 shell 设定。

使用权限:所有使用者。

语法

shell>> chsh

实例

shell>> chsh
Changing fihanging shell for user1
Password: [del]
New shell [/bin/tcsh]: ### [是目前使用的 shell]
[del]
shell>> chsh -l ### 展示 /etc/shells 档案内容
/bin/bash
/bin/sh
/bin/ash
/bin/bsh
/bin/tcsh
/bin/csh

改变当前的shell。当前的shell 设置为//bin/bash,通过chsh命令,改变shell的设置/bin/csh。

# chsh
Changing shell for root.
New shell [/bin/bash]: /bin/csh //输入新的shell地址
Shell changed.

通过 -s 参数改变当前的shell设置

# chsh -s /bin/csh //改变当前设置为 /bin/csh
Changing shell for root.
Shell not changed.

标签:bin,shell,csh,命令,Linux,Changing,chsh
From: https://www.cnblogs.com/hcgk/p/17323042.html

相关文章

  • Linux userdel命令
    Linuxuserdel命令Linuxuserdel命令用于删除用户帐号。userdel可删除用户帐号与相关的文件。若不加参数,则仅删除用户帐号,而不删除相关文件。语法userdel[-r][用户帐号]参数说明:-r删除用户登入目录以及目录中所有文件。实例删除用户账号#userdelhnlinux......
  • Linux usermod命令
    Linuxusermod命令Linuxusermod命令用于修改用户帐号。usermod可用来修改用户帐号的各项设定。语法usermod[-LU][-c<备注>][-d<登入目录>][-e<有效期限>][-f<缓冲天数>][-g<群组>][-G<群组>][-l<帐号名称>][-s<shell>][-u<uid>][用户帐号]参数说明:-c<备注>......
  • Linux reboot命令
    Linuxreboot命令服务器重启有个核心问题,必须知道服务部署清单,因为有些服务没有自动重启而导致服务挂掉agent开发人员更要注意,一定要考虑自动拉起功能Linuxreboot命令用于用来重新启动计算机。若系统的runlevel为0或6,则重新开机,否则以shutdown指令(加上-r参数)来取代......
  • Linux shutdown 命令
    Linuxshutdown命令Linuxshutdown命令可以用来进行关机程序,并且在关机以前传送讯息给所有使用者正在执行的程序,shutdown也可以用来重开机。使用权限:系统管理者。语法shutdown[-tseconds][-rkhncfF]time[message]参数说明:-tseconds:设定在几秒钟之后进行关机......
  • Linux top 命令
    Linuxtop命令快速使用按1可以看更多信息root@jdit:~#toptop-11:50:49up26days,20:53,2users,loadaverage:0.00,0.01,0.00Tasks:123total,1running,122sleeping,0stopped,0zombie%Cpu(s):0.2us,0.2sy,0.0ni,99.7id,0.0wa......
  • Linux pstree 命令
    Linuxpstree命令Linuxpstree(英文全称:displayatreeofprocesses))命令将所有进程以树状图显示,树状图将会以pid(如果有指定)或是以init这个基本进程为根(root),如果有指定使用者id,则树状图会只显示该使用者所拥有的进程。使用权限:所有使用者。语法pstree[-a][-......
  • Linux logname命令
    Linuxlogname命令Linuxlogname命令用于显示用户名称。执行logname指令,它会显示目前用户的名称。语法logname[--help][--version]参数:--help在线帮助。--vesion显示版本信息。实例显示登录账号的信息:#lognameroot......
  • Linux logout命令
    Linuxlogout命令Linuxlogout命令用于退出系统。logout指令让用户退出系统,其功能和login指令相互对应。语法logout实例退出系统:[[email protected]~]#logout......
  • Linux ps 命令
    Linuxps命令快速使用root@jdit:~#ps-auxUSERPID%CPU%MEMVSZRSSTTYSTATSTARTTIMECOMMANDroot10.00.316781213484?SsMar200:38/lib/systemd/systemdnoibrs--system--deserialize49root20......
  • Linux nice命令
    Linuxnice命令Linuxnice命令以更改过的优先序来执行程序,如果未指定程序,则会印出目前的排程优先序,内定的adjustment为10,范围为-20(最高优先序)到19(最低优先序)。使用权限:所有使用者。语法nice[-nadjustment][-adjustment][--adjustment=adjustment][--help][--versio......