• Uncategorized

    Know Your IP Using Command Line

    If you are not behind a router, you can find it out using ifconfig. If you are behind a router, then your computer will not know about the public IP address as the router does a network address translation. You could ask some website what your public IP address is using curl or wget and extract the information you need from it: or shorter

  • Uncategorized

    How to know if a disk is an SSD or an HDD

    Linux automatically detects SSD, and since kernel version 2.6.29, you may verify sda with: You should get 1 for hard disks and 0 for a SSD. It will probably not work if your disk is a logical device emulated by hardware (like a RAID controller). See this answer for more information… ************************************************ With lsblk (part of the util-linux package): lsblk -d -o name,rota where ROTA means rotational device (1 if true, 0 if false)