Although it is becoming easier to have a light graphical environment that hardly consumes resources and that is useful to operate remotely or on computers with few resources. Even so, it is always advisable to know the handling of the terminal and how to do certain operations through this important Gnu / Linux tool.
The steps as well as the process are compatible with any Gnu / Linux distribution, we can even use it in the Ubuntu terminal that works in Windows 10, information that will be useful for the most novice users.
The address of the pendrive is one of the most important points when formatting a pendrive
First of all, we have to know and know the direction that the Gnu / Linux system has given to the pendrive. For that, we just have to write the df command in the terminal and it will tell us which units are connected in the system. A trick: normally the Gnu / Linux system always assigns the letters "sdaX", so if we only have one pendrive connected, it will be a similar or equal name.
Once we have located the pendrive, we have to disassemble it from the system so that it can be formatted. In this case we have to write the following in the terminal:
sudo umount /dev/sda1
Now that the pendrive is disassembled, we have to write the following in the terminal:
sudo mkfs.vfat -F 32 -n "Nombre_pendrive" /dev/sda1(dirección del pendrive)
The variable -F 32 tells the system that formatting must be done with the Fat32 file system. If we use the variable -n we have to indicate the name of the unit, a name that will appear every time we connect the pendrive to our computer. This name can be "pen-drive-name" or just any other name.
Once the process is finished, we only have to mount the pendrive and we will see how the disk does not have any data, something that usually happens when we format a drive or pendrive. By last, emphasize that we must know well the address of the pendrive, since if we get confused and put another address, such as the HD address, we can run out of operating system. Keep it in mind.