Hey guys in this short tutorial i will show you how simple it is to create a linux usb from command line.
We have already have CentOS 7 iso image on our computer( which we downloaded earlier from Centos website).
To list your usb issue the command
salman@Sal-Linux:~/Downloads$ lsblk sde 8:64 1 28,9G 0 disk ├─sde1 8:65 1 1,8G 0 part /media/salman/Linux Mint 20 Xfce 64-bit ├─sde2 8:66 1 3,9M 0 part └─sde3 8:67 1 27,1G 0 part /media/salman/writable
As you can see , my usb is sde and has a Linux Mint image, however i would like CentOS 7.
To burn CentOS 7 image on the usb issue the following command:
root@Sal-Linux:/home/salman/Downloads# dd if=/home/salman/Downloads/CentOS-7-x86_64-Minimal-1804.iso of=/dev/sde oflag=direct bs=1048576
Where:
/dev/sde is my USB drive
of = output file to write to
if = input file to read from
bs = This option enables dd command to read and write bytes per block, default size is 512 Bytes, I am using around 1 MB.
oflag = direct
Use direct I/O for data, avoiding the buffer cache. Note that
the kernel may impose restrictions on read or write buffer
sizes. For example, with an ext4 destination file system and
a Linux-based kernel, using ‘oflag=direct’ will cause writes
to fail with ‘EINVAL’ if the output buffer size is not a
multiple of 512.
Thanks,
Salman A. Francis
https://www.tekco.net
https://www.youtube.com/linuxking
2 Comments
Thank you!!1
You are Welcome