Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to run the Linux command with administrator privileges

Shulou Source: shulou.com Published: 2022-06-01 10:51:14 11月13日 Update

This article mainly introduces "how to run Linux commands with administrator privileges". In daily operation, I believe many people have doubts about how to run Linux commands with administrator privileges. Xiaobian consulted all kinds of information and sorted out simple and easy to use operation methods. I hope to help you answer the doubts about "how to run Linux commands with administrator privileges"! Next, please follow the small series to learn together!

Install SUDO

First, download the SUDO source code using the Git clone command.

$ git clone https://github.com/jthistle/SUDO.git

The above command automatically clones the contents of the SUDO Git repository and saves them in a directory named SUDO under the current path.

Cloning into 'SUDO'... remote: Enumerating objects: 42, done. remote: Counting objects: 100% (42/42), done. remote: Compressing objects: 100% (29/29), done. remote: Total 42 (delta 17), reused 30 (delta 12), pack-reused 0 Unpacking objects: 100% (42/42), done.

Then we switch to the SUDO directory.

$ cd SUDO/

Use the following command to install the SUDU tool.

$ ./ install.sh

The above command adds the following information to the ~/.bashrc file.

[...] # SUDO - shout at bash to su commands # Distributed under GNU GPLv2, @jthistle on github shopt -s expand_aliases IFS_=${IFS} IFS=":" read -ra PATHS

Tags: Commands runs permissions administrators administration learning directories input unexpected uppercase passwords tools files more face-to-face help practical same comfortable next Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology MySQL Linux Shulou Tech Info Huawei