Bash-check-if-root-user: Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

3 September 2024

25 April 2024

15 October 2021

  • curprev 16:1816:18, 15 October 2021Chubbard talk contribs 206 bytes +206 Created page with "<pre> got_root() { if [ "$(id -u)" != "0" ]; then echo "Failure: This script must be run as root or sudo used"; exit 2 else echo "Confirmed: running as root, or sudo used..."