May 17, 2018 at 8:05 am #4308
Copy files from USB to desktop folder without using GUI.
O.K I cheated with GUI a-bit but that didn’t help with a cringe-worthy 20 minute time. :/
First I opened disks (GUI) to find /dev/sdb.
After trying to cd into dev, I am unable to cd into sdb.
What’s intresting is that when I typed df, this comes out.123456789101112Filesystem 1K-blocks Used Available Use% Mounted onudev 3526020 0 3526020 0% /devtmpfs 715500 19428 696072 3% /run/dev/mapper/kali--vg-root 952438348 8970900 895016480 1% /tmpfs 3577484 0 3577484 0% /dev/shmtmpfs 5120 0 5120 0% /run/locktmpfs 3577484 0 3577484 0% /sys/fs/cgroup/dev/sda2 241965 54557 174916 24% /boot/dev/sda1 523248 132 523116 1% /boot/efitmpfs 715496 12 715484 1% /run/user/131tmpfs 715496 60 715436 1% /run/user/0/dev/sdb 15344992 7359704 7985288 48% /media/root/5CFB-AF5E
OK, so I tried to cd into /media/root/5CFB-AF5E to access my files.
What’s intresting is that you cannot just mount block /dev/sdb, the Kernel mounts /dev/sdb to /media/root/someUSBcode.
Can someone explain how the Kernel mounts /dev/sdb??
When you plug a USB in, is /dev/sdb filesystem (reality a file) is created. The file is like an ISO image.
A firmware can mount it to /media/root/, converting it to a folderlike directory for the user to cd in.
You cannot cd into a file.
May 17, 2018 at 12:37 pm #4324
Hola. So this falls into the category of Linux fundamentals. I’ll point you in a direction, but remember, Kali Linux is not the best platform for learning Linux. You will do much better if you tackle Linux first and then step into this training.
But in short, you are correct. Linux maps all devices to the filesystem (usually in /dev). What that means is that when you interact with that file in /dev, you are mucking with a device.
In your case /dev/sd is traditionally where “SCSI” devices were, but it’s become a catch-all for any block device not accessible by IDE, so USB devices fit in here. The letter after /dev/sd marks the order in which the device was found. So /dev/sda is the first non-IDE device (typically your hard drive) and /dev/sdb is likely your removable USB drive. Next, comes the partition. So /dev/sdb1 is the first partition on the second non-IDE device on your system.
That’s about as far as I’m willing to help you in this regard because you’ll need to dive into Linux. I highly recommend this free course to get you started.
Hope that helps, and thanks for jumping into the training!
January 11, 2019 at 3:06 am #17050
You must be logged in to reply to this topic.