Useful commands

    Find which package contains a particular file πŸ”—

    apt-file
    

    Consume CPU resources πŸ”—

    cat /dev/zero > /dev/null
    

    Check which shells are available πŸ”—

    cat /etc/shells
    

    Show largest folder/files πŸ”—

    du -a -BM . | sort -n -r | head -n 30
    

    Set environment variables in bash πŸ”—

    export VAR=abc
    

    Check what type of file something probably is πŸ”—

    file
    

    Search for a file/folder πŸ”—

    find -name "PATTERN"
    

    Show command history πŸ”—

    history
    

    Show IP Addresses πŸ”—

    ip -c a
    

    Show default gateway and routes πŸ”—

    Source: https://www.rootusers.com/how-to-display-routing-table-in-linux/

    ip -c r
    

    See installed kernels πŸ”—

    find /boot/vmli*
    

    Consumes RAM (And CPU) πŸ”—

    memtester
    

    Show network devices πŸ”—

    nmcli device status
    

    Check which shell is in use πŸ”—

    ps -p $$
    

    Get SHA1 hash of a file πŸ”—

    sha1sum
    

    Get SHA256 hash of a file πŸ”—

    sha256sum
    

    Start Discord Minimized πŸ”—

    snap run discord --start-minimized
    

    Get file β€œproperties” πŸ”—

    stat
    

    Check system to see which sensors are available πŸ”—

    sudo sensors-detect
    

    See bluetooth logs πŸ”—

    sudo systemctl status bluetooth
    

    Get a checksum for a file πŸ”—

    Source: https://www.baeldung.com/linux/sha-256-from-command-line

    The source also shows how to verify against the checksum file

    sha256sum my_file.txt
    
    sum my_file.txt
    

    Get checksum for a string πŸ”—

    echo string | sha256sum
    

    Manage TexLive Packages πŸ”—

    Was already installed on my system not sure from where or when

    tlmgr
    

    Move files to trash from command line πŸ”—

    trash
    

    Check version of linux in use πŸ”—

    uname -a
    

    See power status for connected devices πŸ”—

    upower --dump
    

    Watch the sensor stream πŸ”—

    watch sensors