Or press ESC to close.

Linux: How to use basic commands [Part 2]

02 October 2025 00:11 Computer

The following commands are centered around storage in Linux.

Most of them are not too hard to understand, and they're pretty useful to know when you're starting:


Storage commands:

                

mount mount a file system

umount unmount

fsck check and repair file system

fdisk manipulate disk partition table

mkfs create a filesystem

dd convert and copy a file

genisoimage (mkisofs) create an iso 9660 image file

wodim (cdrecord) write data to optical storage media

md5sum Calculate an MD5 checksum

/etc/fstab lists the devices mounted at boot time

Devices are in /dev

                

/dev/fd* floppy disks

/dev/hd* IDE disks

/dev/lp* printers

/dev/sd* SCSI disks (PATA/SATA Hard disks, flash drives, SSD...)

/dev/sr* Optical drives (CD/DVD readers and burners)

To know the name of a new device, use journalctl and G (on Arch Linux)

lsblk to check the mounted devices


Format the partition, not the device (sdc1 not sdc)


                

sudo mkfs -t vfat /dev/sd* format in FAT32

ext4 /dev/sd* format in ext4

Be careful with dd. Do not mistype "if" or "of".


                

dd copies blocks of data from one place to another.

dd if=input_file of=output_file [bs=block_size[count=blocks]]

dd if=/dev/sdb of=/dev/sdc copy everything from sdb to sdc

dd if=/dev/sdb of=flash_drive.img copy to ordinady file

dd if=/dev/cdrom or=ubuntu.iso make a copy of cd into a iso file

(doesn't work for audio CD)

Most of my studying of Linux was done using the book: The Linux Command Line by William Shotts, while daily driving Arch Linux.

I highly recommend the book for anyone wanting to learn Linux.

Hedi0410

based in France.