介绍 (Introduction)
The sudo
command provides a mechanism for granting administrator privileges — ordinarily only available to the root user — to normal users. This guide will show you how to create a new user with sudo
access on Ubuntu 18.04, without having to modify your server’s /etc/sudoers
file. If you want to configure sudo
for an existing user, skip to step 3.
sudo
命令提供了一种向普通用户授予管理员特权(通常仅对root用户可用)的机制。 本指南将向您展示如何在Ubuntu 18.04上创建具有sudo
访问权限的新用户,而无需修改服务器的/etc/sudoers
文件。 如果要为现有用户配置sudo
,请跳至步骤3。
第1步-登录到服务器 (Step 1 — Logging Into Your Server)
SSH in to your server as the root user:
以root用户身份登录到服务器:
ssh root@your_server_ip_address
ssh root @ your_server_ip_address