Linux useradd命令

0 Preface/Foreword

1 useradd介绍

该命令是系统管理命令(System management command)。

useradd- create a new user or update default new user information

1.1 描述

++useradd++ is a low level utility for adding users. On Debian, administrators should usually use adduserinstead.

When invoked without the**-D** option, the useradd command creates a new user account using the values specified on the command line plus the default values from the system. Depending on command line options, the useradd command will update system files and may also create the new user's home directory (主目录,根目录) and copy intial files.

1.2 --comment

-c, --comment COMMENT

Any text string. It is generally a short description of the login , and is currently used as the field for the ++user's full name++.

1.3 --create-home

-m, --create-home

Create theuser's home directory if it does not exist. The files and directories contained in the skeleton directory (which can be defined with the -k) will be copied to the home directory.

1.4 --shell

-s, --shell SHELL

The name of theuser's login shell . The default is to leave the field blank , which causes the system to select the default login shell specified by the SHELL variable in /etc/default/useradd, or an empty string by defaut.

相关推荐
毒爪的小新5 小时前
Linux 环境极速部署 vLLM:从零搭建生产级大模型推理服务
linux·人工智能·ai·语言模型·vllm
鹤落晴春5 小时前
RH124问答3:从命令行管理文件
linux·运维·服务器
凡人叶枫5 小时前
Effective C++ 条款30:透彻了解 inlining 的里里外外
linux·开发语言·c++·嵌入式开发·effective c++
Net_Walke6 小时前
【Linux系统】静态链接库与动态链接库
linux·嵌入式硬件
syc78901236 小时前
中文语境下AI编码工具实战对比:从迭代体验看日常开发选择
linux·人工智能·ubuntu
凡人叶枫7 小时前
Effective C++ 条款22:将成员变量声明为 private
linux·开发语言·c++
vsropy9 小时前
Ubuntu网络图标消失问题/有网络问号
linux·运维·ubuntu
coderwu9 小时前
Ubuntu 24.04 终端输入 openclaw config 提示未找到命令解决办法
linux·运维·ubuntu
凡人叶枫11 小时前
Effective C++ 条款28:避免使用 handles 指向对象内部
linux·服务器·开发语言·c++·嵌入式开发
AI帮小忙11 小时前
Debian系linux操作系统里安装OpenClaw
linux·运维·debian