Skip to content

Hardware

bleachchyxo edited this page Mar 3, 2023 · 3 revisions

ifconfig

Changing your MAC Address

In order to change your MAC address start by turning off the network interface

ifconfig <network interface> down

Now set the new MAC address

ifconfig wlan0 hw ether <new mac-address>

Flash Drive

Most of things I need when messing with flash drives

Mounting a Flash Drive

We must start by creating the directory where we are going to mount the flash drive

$ sudo mkdir /media/usb

Now connect your flash drive to the machine and try to locate it using lsblk. In my case is sdb so we can proceed to mount it.

$ sudo mount /dev/sdb /media/usb/

You can now cd into /media/usb/ and see the content, when you're done just fire off:

$ sudo umount /dev/sdb /media/usb/

Formatting a Flash Drive

First of all enter as a root user so we can proceed formatting the flash drive by using the command

# fdisk /dev/sdb

Next type d to delete a partition, type 1 to select the 1st partition then press enter. Continue repeating this process until you've deleted every partition left.

Now we need to create the new partition by typing n, then press enter 3 times to accept the default options and now to type w to write the new information into the flash drive.

And finally we need to create the filesystem by typing

# mkfs.ext4 /dev/sdb

Burning an ISO into your flash drive

You want to get into root user and locate your flash drive, in my case /dev/sdb/ and the iso file is called devuan_beowulf_3.1.1_i386_desktop.iso

# dd if=devuan_beowulf_3.1.1_i386_desktop.iso of=/dev/sdb status="progress"

Time and Date

Displaying the Date

In order to take a look at your machines date and time you must type:

$ date

It must display your machines date:

Tue 21 Feb 2023 01:14:02 AM CST

Setting the Time and Date

In order to set a new time and date we must enter:

sudo date --set="20230221 21:04"

In this case the date will be set to 21/02/2023 and the time will be 21:04 PM. Once run it you can verify if the date was set by typing again date.

$ date
Tue 21 Feb 2023 09:04:03 PM CST