mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2024-11-25 01:23:08 +01:00
fix: fix the description of sudo
This commit is contained in:
parent
3ae3f70da4
commit
4f141293d5
@ -317,9 +317,8 @@ Error: nu::shell::external_command
|
|||||||
/home/ryan/nix-config> exit
|
/home/ryan/nix-config> exit
|
||||||
```
|
```
|
||||||
|
|
||||||
But it's possible to run those packages with privileged access without switching to
|
The solution is to use `sudo` to run the command, which temporarily grants the current
|
||||||
`root`, by using `sudo`, we temporarily grant the current user privileged access to system
|
user the ability to run the command as a privileged user (`root`):
|
||||||
resources:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
› sudo kubectl
|
› sudo kubectl
|
||||||
|
@ -305,8 +305,8 @@ Error: nu::shell::external_command
|
|||||||
/home/ryan/nix-config> exit
|
/home/ryan/nix-config> exit
|
||||||
```
|
```
|
||||||
|
|
||||||
但是,我们可以通过 `sudo` 命令,临时授予当前用户访问系统资源的特权,从而在不切换到 `root`
|
解决方法是,使用 `sudo` 来运行命令,该命令临时授予当前用户以特权身份(`root`)运行命令的权
|
||||||
用户的情况下,使用 `home.nix` 安装的软件包:
|
限:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
› sudo kubectl
|
› sudo kubectl
|
||||||
|
Loading…
Reference in New Issue
Block a user