Format USB Drive in Linux – Command Line

Formatting USB drives in Linux from the command line (terminal) is very easy.

In this note i will show how to format an external HDD, SSD or USB flash drive in Linux from the command line using mkfs utility.

I will provide the examples of disk formatting to the most popular file system types: FAT32, exFAT, NTFS, EXT4, XFS and will show how to list the all supported file systems. (more…)

Raspberry Pi: Mount USB Drive – Automatically

You can connect the external HDD, SSD or USB flash dives to any of the USB ports on the Raspberry Pi and mount the file system to access the data stored on it.

In this article i will show how to manually or automatically at boot time mount a storage device on the example of a USB flash drive.

I will also show how to mount USB storage devices automatically when they are plugged in, and unmount them when they are removed using usbmount tool. (more…)

PowerShell: Check If Port is Open – Test TCP Connection

During troubleshooting of different issues it is often required to check if some TCP port on a remote host is opened and ensure that it is not blocked by a firewall.

The most common tool for this is telnet, but it may not be installed or you may want to be able to copy the output to paste it into a ticket or to send it someone, that is not always possible with telnet.

Also the telnet command is not very handy if you need to check connectivity to multiple hosts/ports, but you can do this easily with a PowerShell.

In Windows, you can test connection to TCP port from the command line using PowerShell and in this note i will show how to do this. (more…)

OpenVPN: Connect Client Setup – Install & Config – Linux

In this article i am showing how to install OpenVPN client on RPM/DEB-based Linux distributions and configure it to connect to OpenVPN server.

Particularly i will show an example of OpenVPN client configuration file that i use to connect to OpenVPN server with certificates and username/password-based authentication, how to create a systemd service for OpenVPN client and how to configure it to start on the system’s boot. (more…)

Check Real Actual Size – USB Flash Drive, SD Card

Once a USB flash drive or an SD card is purchased, it is a good idea to check if the announced capacity of a device is real or fake (as a system may show a wrong size).

Linux and MacOS users can do this from the command line using the f3 – a set of tools for testing for fake USB flash drives and SD cards by measuring their real capacity and READ/WRITE speed.

In this note i will show how to find out the actual size of USB flash drives and SD cards, how to fix drives with fake capacity and how to measure the real READ/WRITE performance. (more…)

Raspberry Pi: Shutdown & Reboot Safely – Command

If you don’t want to corrupt the file system on SD card, you should always shutdown and reboot Raspberry Pi correctly (not just by pulling the power cable out).

To shutdown or reboot Raspberry Pi safely through the GUI, simply search the menu for the corresponding buttons.

In this note i will show how to shutdown or reboot Raspberry Pi safely from the command line. (more…)

Raspberry Pi: CPU/GPU Temperature Monitor

Max operating temperature of Raspberry Pi is 85°C.

If the temperature exceeds 82°C, then the CPU’s clock speed will be slowed until the temperature drops below 82°C.

So it is very important to monitor the temperature of the board and Raspberry Pi has a built-in sensor for this.

In this note i will show how to check the CPU/GPU temperature of Raspberry Pi. (more…)

Vi/Vim – Backspace Not Working

If you try to delete characters in the insert mode with the backspace key in vi/vim text editor, this sometimes may not work.

Even though this is not a bug but a feature of vi/vim, you may still want to fix a backspace that is “not working”.

In this small note i will show how to fix “not working” backspace key in the insert mode in vi/vim. (more…)