How to Create Bootable CentOS 7 USB Stick (to Command Line) on Linux

Vineet Kumar
2 min readJan 25, 2020

--

Downloading CentOS ISO file

Download the CentOS ISO file from the CentOS downloads page where you can choose between “DVD ISO” and “Minimal ISO”.

Creating Bootable CentOS 7 USB Stick on Linux

  1. Insert the USB flash drive into the USB port.
  2. Find out the name of your USB drive with the lsblk command: $ lsblk

The output will look like this:

Output Sample of lsblk command

In our case the name of the USB device is /dev/sdx but this may vary on your system.

3. On most Linux distributions the USB flash drive will be automatically mounted when inserted. Before flashing the image make sure the USB device is not mounted. To do so use the umount command followed by either the directory where it has been mounted (mount point) or the device name:

unmount the device

4. The last step is to flash the CentOS ISO image to the USB drive. Make sure you replace /dev/sdx with your drive and do not append the partition number. Also, replace /path/to/CentOS-7-x86_64-DVD-1810.iso with the path to the ISO file. If you downloaded the file using a web browser then it should be stored in the Downloads folder located in your user account.

$ sudo dd bs=512k if=/path/to/CentOS-7-x86_64-DVD-1810.iso of=/dev/sdx status=progress oflag=sync

The command will show a progress bar while flashing the image.

5. The process may take several minutes, depending on the size of the ISO file and the USB stick speed. Once completed you will see something like below:

That’s all, at this point you have a bootable CentOS on your USB stick.

--

--

No responses yet