Essential first steps on a fresh BeagleBone Black
You should complete the following steps in order to make the BeagleBone only accessible to you, and to make Ubuntu a bit friendlier.
Creating a new user and deleting the standard user
Assuming you are connected to the BeagleBone via ssh, you can create a new user by issuing the following command:
sudo adduser bob
Enter a Password and as much personal information as you want. Give the new user adminastration rights by adding him to the sudoers
sudo visudo
If you don't want to be bothered with password questions all the time, append the line
bob All=(ALL) NOPASSWD: ALL
to the file. Alternatively, you can make the line look like
bob ALL=(ALL) ALL
This asks you for the password when you use the sudo command. It is considered more safe.
Save the file by simultaneously pressing CTRL+O
. Then exit the editor
with the command CTRL+X.
You are back in the terminal. Now switch to the freshly created user by
running
su bob
Congratulations! You now have your very own user account.
Try to make a test file to see if you have user rights.
sudo touch test_file
Now check if this file is there:
ls -la
You should see something like
-rw-r--r-- 1 root root 0 Sep 12 11:20 a
The middle part confirms that the file belongs to the user "root" and to the group "root".
Logout of the session as the new user "bob" by typing
exit
and then out of the ssh session as ubuntu by typing
exit
again. Then do a fresh login as the new user bob, using ssh (see above). Now, as the user "bob", do:
ps aux | grep ubuntu
to see if the old user has any processes running. If so, kill them using
sudo pkill <process-name>
# or
sudo pkill -15 <process-id>
Then remove the default user using
sudo userdel ubuntu
sudo rm -r /home/ubuntu
The last command removes the home directory of ubuntu, which is not needed anymore. Caution: It can delete other things, if you don't type it exactly as shown.
Updating the software
Update your system
sudo apt-get update
sudo apt-get upgrade
Press enter whenever it asks if it should proceed
Install the man-pages
Install manual pages
sudo apt-get install man-db
Read your first manual page
man rm
This is the manual page for the "remove" command.
Type /prompt
and press ENTER
to search for the word "prompt" in
this manual page.
Type /
and press ENTER
to search for the next instance of the word
"prompt".
Use the arrow-up
and arrow-down
, page-up
and page-down
keys to
scroll up and down.
Type q
to quit viewing this manual page.
Updating the system time
Update the system time.
sudo ntpdate ptbtime2.ptb.de
Set the correct timezone
sudo dpkg-reconfigure tzdata