Bash: UID 0 (root user) Confirmation

nick3499
1 min readFeb 19, 2017

--

The if [ $UID -ne 0 ]; then conditional statement basically means, if the user ID does not equal zero, then… In a Unix-like terminal, if the user has root user privilege, then echo $UID will return 0. Otherwise, it will probably return 1000, which indicates standard user with less privileges than root aka superuser.

--

--

nick3499
nick3499

Written by nick3499

coder of JavaScript and Python

No responses yet