What You Should Know about the Raspberry Pi Prompt

By Sean McManus, Mike Cook

When you log in to your Raspberry Pi, you will see a prompt that looks like this, with a cursor beside it, always ready for you to enter your command:

pi@raspberrypi ~ $

At first glance, that prompt can look quite foreign and unnecessarily complicated (why doesn’t it just say OK or Ready?), but it actually contains a lot of information. This is what the different bits mean:

  • pi: This is the name of the user who is logged in. If you log in as a different user, you see that user’s name here instead.

  • raspberrypi: This is the hostname of the machine, which is the name other computers might use to identify the machine when connecting to it.

  • ~ : In Linux, people talk about organizing files in directories rather than folders, but it means the same thing. This part of the prompt tells you which directory you are looking at (the current working directory). The tilde symbol (a horizontal wiggly line) is shorthand for what is known as your home directory, and its presence in the prompt here shows that you’re currently working in that directory.

    This is where you should store your work and other files. An ordinary user doesn’t have permission to put files anywhere except for his or her home directory or any directories inside that home directory.

  • $: The dollar sign means that you are a humble ordinary user, and not an all-powerful superuser. If you were a superuser, you would see a # symbol instead.