Hi again folks!
I have installed Raspbian Buster Lite on a headless pi zero w. I’ve SSH into the Pi0W into a terminal. The problem is that I log in as a normal user, not the root.
I have plugged in a usb drive. When I type in ‘sudo fdisk -l’, it shows the usb device as ‘/dev/sda1’.
So I type
sudo mkdir /media/usb-drive
sudo mount /dev/sda1 /media/usb-drive/
Then I try to access the drive:
cd /media/usb-drive
But get the error message: ‘cd: /media/usb-drive/: Permission denied’ because I am not root.
So I try ‘sudo cd /media/usb-drive’ and get the error message 'cd: command not found.
So how do I access the usb drive as a normal user? And if the only way for me to access the drive is as root, how can I become root? According to the raspberry documentation, users can only use ‘sudo’ to execute some commands as root, but I can’t find any information via google about how to actually become root.
https://www.raspberrypi.org/documentation/linux/usage/root.md
Any and all help would be greatly appreciated. Thank you.