June 2025
Beginner to intermediate
473 pages
13h 30m
English
On Linux and macOS, you can modify only your own files and read only selected files of other users. Working within this limitation may be sufficient for your everyday work, but not for scripts that are supposed to perform admin tasks.
The solution in such cases is sudo which allows you to execute a single command or an entire script with admin rights (or, as it is called in Linux, with “root privileges”). The first of the following two commands performs a software installation (Section 6.5), while the second command runs a script in the local directory:
$ sudo apt install somepackage [sudo] Password for <accountname>: ********$ sudo ./myscript.sh
sudo can only ...
Read now
Unlock full access