Linux

  • How check hard disk partitions and disk space on Linux

    List of commands to view Disk partitions and or Disk space 

    df -h
    pydf
    lsblk
    lsblk -o PATH,SIZE,RO,TYPE,MOUNTPOINT,UUID,MODEL
    fdisk -l
    sfdisk -l -uM
    cfdisk /dev/sdb
    parted -l
  • How to change your password on Linux

    The command used to change your password from the Linux command line is: 

    passwd

    Please not it is always important to change from the default password on any OS before the OS ever connects to the network. It only takes seconds for malware to find the default account and pw to access the systems and install back doors. 

  • How to release and renew your ip in Linux

    To release your IP at the CMD Prompt type:

     sudo dhclient – r

    To renew your IP: 

    sudo dhclient

    To display your IP:

    ifconfig
  • How to turn your Linux pc off via the command line

    Commands used to turn off a Linux work station. Commands do differ depending on which flavor Linux you are running. Sometimes even the topping makes a difference. 

    shutdown
    reboot
    halt
    poweroff
  • Linux updates and upgrades cmd

    Linux command for running running all updates and upgrades. -> Raspbian based

    sudo apt-get update && sudo apt-get upgrade -y

    Centos 8 and up

    dnf update

    Centos 8 and up for a specific package

    dnf update [httpd/other package name]
  • Raspberry PI Imager and advanced options

    The Raspberry Pi Imager is used in windows to load the Raspberry Pi os and others on to SD cards to use in a raspberry pi. This tool makes it very easy to load the pi and get started. but that's not what this note is about. What i want to call attention to is that there is an advanced set of option that allows you to pre-configure things like:

    1. Passwords
    2. enable SSH and keys
    3. Hostname
    4. WIFI ssid
    5. Local

    These are all things you will have to configure when you first login to the OS. So it is simpler to do it in the imager. 

    You can download the Raspberry Pi Imager here

    Accessing advanced mode is very simple. With the imager screen active press:

    Ctrl-Shift-X

    The advanced menu is especially useful when setting up the pi for headless operation as it eliminates all the messing with files on the SD card