From 4f141293d52165fc8ad5d05b5eab6dcc5b5845ab Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Wed, 17 Apr 2024 22:23:28 +0800 Subject: [PATCH] fix: fix the description of sudo --- docs/nixos-with-flakes/start-using-home-manager.md | 5 ++--- docs/zh/nixos-with-flakes/start-using-home-manager.md | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/nixos-with-flakes/start-using-home-manager.md b/docs/nixos-with-flakes/start-using-home-manager.md index 7400639..2ed9cac 100644 --- a/docs/nixos-with-flakes/start-using-home-manager.md +++ b/docs/nixos-with-flakes/start-using-home-manager.md @@ -317,9 +317,8 @@ Error: nu::shell::external_command /home/ryan/nix-config> exit ``` -But it's possible to run those packages with privileged access without switching to -`root`, by using `sudo`, we temporarily grant the current user privileged access to system -resources: +The solution is to use `sudo` to run the command, which temporarily grants the current +user the ability to run the command as a privileged user (`root`): ```sh › sudo kubectl diff --git a/docs/zh/nixos-with-flakes/start-using-home-manager.md b/docs/zh/nixos-with-flakes/start-using-home-manager.md index ffc82cc..9160eee 100644 --- a/docs/zh/nixos-with-flakes/start-using-home-manager.md +++ b/docs/zh/nixos-with-flakes/start-using-home-manager.md @@ -305,8 +305,8 @@ Error: nu::shell::external_command /home/ryan/nix-config> exit ``` -但是,我们可以通过 `sudo` 命令,临时授予当前用户访问系统资源的特权,从而在不切换到 `root` -用户的情况下,使用 `home.nix` 安装的软件包: +解决方法是,使用 `sudo` 来运行命令,该命令临时授予当前用户以特权身份(`root`)运行命令的权 +限: ```sh › sudo kubectl