Linux脚本检测当前用户是否为root用户时间:2022-11-25 14:29:12#/bin/bash if [ $UID -ne 0 ]; then echo Non root user. Please run as root. else echo Root user fi