linux 判断当前用户是否是root
linux 中,如何判断当前用户是否是root 呢? 判断当前用户是否是root 复制代码代码如下: #---------------------------- root user check ---------------------start if [ `id -u` -ne 0 ]; then echo "Please re-run ${this_file} as root." exit 1 fi #-------------------------...