# login

登录系统或切换用户身份

## 补充说明

**login命令** 用于给出登录界面，可用于重新登录或者切换用户身份，也可通过它的功能随时更换登入身份。在Slackware发行版中 ，您可在命令后面附加欲登入的用户名称，它会直接询问密码，等待用户输入。当`/etc/nologin`文件存在时，系统只root帐号登入系统，其他用户一律不准登入。

### 语法

```
login(选项)(参数)
```

### 选项

```
-p：告诉login指令不销毁环境变量；
-h：指定远程服务器的主机名。
```

### 参数

用户名：指定登录使用的用户名。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hezhiqiang.gitbook.io/linux/ming-ling/login.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
