kylebarron / linux_setup

Script to install software on a new computer or VM instance
MIT License
3 stars 1 forks source link

automatically tell if run as root or not #50

Open kylebarron opened 6 years ago

kylebarron commented 6 years ago
if [[ "$EUID" -ne 0 ]]; then
    echo "Please run as root"
    exit
else
    echo "This is root"
fi