Getting Started with the Raspberry Pi Zero Wireless

Pages
Contributors: M-Short
Favorited Favorite 14

Update Software

The last thing we are going to do is to update all the software packages on the board. Packages are constantly updated, and no one wants to be left behind. Luckily, Linux uses a package manager. All we have to do is tell our package manager to update everything, and then sit back and watch. Let's go over a few of the commands we'll be using. Go ahead and open the terminal, if it isn't already open. Type the following.

pi@raspberrypi:~ $ sudo apt-get update

This will go fetch the latest package information and tell the package manager what needs to be updated.

  • sudo (also known as super user) is a command that you will see a lot, specifically with high security commands. It makes sure you have the correct privileges. Depending on settings, it may or may not ask you for a password.

  • apt-get is the package manager and update is the command we are giving it.

pi@raspberrypi:~ $ sudo apt-get upgrade

This will download and upgrade all the packages. Please note that this upgrade will take a while. It will also prompt you if this is really what you want to do, the correct answer is "Y".

pi@raspberrypi:~ $ sudo shutdown -r now

  • shutdown will shutdown the machine. -r tells it to reboot after shutting down, and now tells it to do so now (15 would tell the machine to shutdown in 15 minutes).

What happens if you don't type in sudo? Linux will give you an error saying you don't have permission to do something. Generally if you see that error stop for a second and think if you really know what you are doing and want to do it. If you do, then type sudo in front of your command, and try again.

Other Useful Linux Commands

A few other useful commands for use in the terminal command line:

  • pwd - Print Working Directory, if you not sure what folder you are in this will tell you where you are in the filesystem.

  • ls - List, this will show you the contents of the folder. To show all files, including hidden ones, type ls -a to show all files/folders. Alternatively, typing ls -al will show you all files/folders as well as their permission settings.

  • cd - this is how you change directories. cd foldername will move you to that folder. cd .. will back you up one level. cd ~ will take you back to your home directory.

  • passwd - this will allow you to change your password

  • man - this stands for manual. Type man before a command to get a summary of how to use it.

  • nano - this will open a basic text editor that is fairly easy to use.

At this point you should be interacting with your Raspberry Pi like you would any other computer. You can teach yourself the finer points of Linux, learn Python, program the GPIO pins, setup a minecraft server, build a network storage system, game console, or media center, or just surf the web.