← 返回命令列表

Linux command

add-shell 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Add

sudo add-shell [/usr/local/bin/zsh]

Example

sudo add-shell [/bin/fish] [/bin/zsh]

说明

add-shell is a Debian utility that safely adds new shell paths to /etc/shells. The /etc/shells file lists valid login shells that users can select with chsh. The tool checks for duplicates and validates the path before adding it, making it safer than manually editing /etc/shells.

参数

shell
Absolute path to the shell executable to add

FAQ

What is the add-shell command used for?

add-shell is a Debian utility that safely adds new shell paths to /etc/shells. The /etc/shells file lists valid login shells that users can select with chsh. The tool checks for duplicates and validates the path before adding it, making it safer than manually editing /etc/shells.

How do I run a basic add-shell example?

Run `sudo add-shell [/usr/local/bin/zsh]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does shell do in add-shell?

Absolute path to the shell executable to add