<commit_before># .always_forget.txt
#
# awdeorio's UNIX cheat sheet
#
# <NAME> <<EMAIL>>

# Users and Groups
adduser USER                            # add USER (Debian)
adduser USER GROUP                      # add USER to GROUP (Debian)
useradd USER                            # add USER, native binary
useradd -m -G users,wheel -s /bin/bash USER # add new USER manually
useradd --system                        # no homedir, no passwd, can't log in
deluser USER                            # remove a user
delgroup GROUP                          # remove a group
usermod -u UID USER                     # change UID
usermod -g GID USER                     # change default group
groupmod -g GID group                   # change GID of group
gpasswd -a USER GROUP                   # add awdeorio to audio group
smbpasswd -a USER                       # new Samba user
chsh -s /bin/bash USER                  # change default shell
id                                      # print user and group ID #'s
getent passwd USER                      # check if user exists
getent group GROUP                      # check if group exists
ulimit -a                               # per-user system limits
groups                                  # list group membership
users                                   # list users logged in
w                                       # list users logged in
who                                     # list users logged in
finger USER                             # directory info about USER
whoami                                  # current user
logname                                 # current logged in user (e.g., w/ sudo)
passwd                                  # change your password
passwd USER                             # change USER's password
echo "USER:NEW_PASSWORD" | chpasswd     # change USER's password, batch

# Machines
hostname                                # name of this computer
uname                                   # operating system name
uname -a                                # info about OS, compiler, etc.
cat /proc/cpuinfo                       # CPU size/features
cat /proc/meminfo                       # memory size/features
uptime                                  # time since power on
lspci                                   # list PCI devices
lspci -vv                               # ^^^ with lots of info

# Files and folders
ls                                      # list directory contents
ls -l                                   # include time, size, etc.<commit_msg>.always_forget += chage<commit_after># .always_forget.txt
#
# awdeorio's UNIX cheat sheet
#
# <NAME> <<EMAIL>>

# Users and Groups
adduser USER                            # add USER (Debian)
adduser USER GROUP                      # add USER to GROUP (Debian)
useradd USER                            # add USER, native binary
useradd -m -G users,wheel -s /bin/bash USER # add new USER manually
useradd --system                        # no homedir, no passwd, can't log in
deluser USER                            # remove a user
delgroup GROUP                          # remove a group
usermod -u UID USER                     # change UID
usermod -g GID USER                     # change default group
groupmod -g GID group                   # change GID of group
gpasswd -a USER GROUP                   # add awdeorio to audio group
smbpasswd -a USER                       # new Samba user
chsh -s /bin/bash USER                  # change default shell
id                                      # print user and group ID #'s
getent passwd USER                      # check if user exists
getent group GROUP                      # check if group exists
ulimit -a                               # per-user system limits
groups                                  # list group membership
users                                   # list users logged in
w                                       # list users logged in
who                                     # list users logged in
finger USER                             # directory info about USER
whoami                                  # current user
logname                                 # current logged in user (e.g., w/ sudo)
passwd                                  # change your password
passwd USER                             # change USER's password
echo "USER:NEW_PASSWORD" | chpasswd     # change USER's password, batch
chage -E 2000-01-01 USER                # disable login with past expiration
chage -E -1 USER                        # password never expires

# Machines
hostname                                # name of this computer
uname                                   # operating system name
uname -a                                # info about OS, compiler, etc.
cat /proc/cpuinfo                       # CPU size/features
cat /proc/meminfo                       # memory size/features
uptime                                  # time since power on
lspci                                   # list PCI devices
lspci -vv                               # ^^^ with lots of info

# Files and folders
ls                                      # list directory contents
ls -l                                   # include time, size, etc.
{'fraction_non_alphanumeric': 0.04634239754883186, 'fraction_numerical': 0.0017234775947912676, 'mean_word_length': 0.9657508468197215, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 52, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '720494', 'n_tokens_mistral': 1241, 'n_tokens_neox': 1134, 'n_words': 484}