Answers for "how to make bash script must be ran in sudo"

0

how to make bash script must be ran in sudo

if [[ $(/usr/bin/id -u) -ne 0 ]]; then
    echo "Not running as root"
    exit
fi
Posted by: Guest on October-20-2021

Code answers related to "how to make bash script must be ran in sudo"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language