quickreference:unix
Differences
This shows you the differences between two versions of the page.
| quickreference:unix [2025/02/05 00:12] – created - external edit 127.0.0.1 | quickreference:unix [2026/05/27 01:33] (current) – rodolico | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| ===== Systems Administration ===== | ===== Systems Administration ===== | ||
| + | |||
| + | ==== Get list of all non-system Users ==== | ||
| + | |||
| + | I needed a quick 'one liner' to get all non-system users on a Unix system. In this case, non-system was defined as having a UID >= 1000 (common practice) or a shell. The first line defines this. | ||
| + | |||
| + | This command can be copied and pasted into a terminal as a standard user, and will result in a tab separated list of the user, home directory, shell, and a comma separated list of group memberships | ||
| + | |||
| + | <code bash> | ||
| + | getent passwd | awk -F: ' | ||
| + | | while IFS=: read user home shell; do groups=$(id -nG " | ||
| + | </ | ||
| ==== Partitioning large drives ==== | ==== Partitioning large drives ==== | ||
quickreference/unix.txt · Last modified: by rodolico
