Skip to content

Commands

Commands based on useful packages

adduser

# debian - sudo group
# rhel/fedora - wheel group
useradd -m -s /bin/bash -G sudo newUserName
    # -m make home directory at /home/newUserName
    # -s set default shell
    # -G set group

btop

similar to htop

btop
    # better top

gdu

graphical du command that is really fast

gdu 
    -x / # do not cross filesystem boundaries, i.e. only count files and directories on the same filesystem as the directory being scanned.
    --exclude=/<directory>

lsof

lsof
    # lists open files

ncdu

graphical du command that is really fast

ncdu 
    -x / # do not cross filesystem boundaries, i.e. only count files and directories on the same filesystem as the directory being scanned.
    --exclude=<directory>

nproc

nproc
    # number of processors

ps

report a snapshot of current processes

    ps aux # list all running processes
    ps -e # same as ps aux but different format

ssh-keygen

ssh-keygen
    -t # for type
    -C # for comment
ssh-keygen -t ed25519 -C "username@machine-name"