Listing 2.2 shows how you enter the whoami command. The whoami command displays the name of
the user who entered the command. In this case, you can see that the user pi entered the command.
LISTING 2.2 Entering a Command at the Command Line
Click here to view code image
pi@raspberrypi ~ $ whoami
pi
pi@raspberrypi ~ $
You can do a lot of work at the Linux command line. Table 2.1 lists some commands that will help
you as you start to learn Python programming.
TABLE 2.1 A Few Basic Command-Line Commands
In the following Try It Yourself, you will start to use some commands so you can begin to understand
them better.
Try It Yourself: Log In and Issue Commands at the Command Line
In this section, you will try out a few commands at the Raspbian command line. As
you’ll see in the following steps, contrary to popular belief, using the command line is
not hard at all:
- Power-up your Raspberry Pi. You will see a lot of startup messages scroll by the
screen. These are informational, and it is a good habit to view the messages as they
scroll by. Don’t worry if you don’t know what they mean. Over time, you will learn. - At the raspberrypi login: prompt, type pi and press the Enter key. You
should now see a Password: prompt. - At the Password: prompt, type raspbian and press the Enter key. If you are
successful, you see the pi@raspberrypi ~ $ prompt. If you are not successful,
you get the message “Login incorrect,” and you see the raspberry pi login:
prompt again.
By the Way: Blank Passwords
If you have never logged into a Linux command line, you may be surprised by
the fact that nothing is displayed when you type in a password. Normally, in a
graphical user interface environment, you see a large dot or asterisk displayed
for each character you type into the password field. However, the Linux