Moving on to the LXTerminal
While the Raspberry Pi has a healthy variety of applications and programs for our consumption, we’re going to be primarily using the LXTerminal to download and interact with the Magic Mirror program. For those of you unfamiliar with the Terminal, it’s essentially a program that allows a user to directly manipulate their computer system through the use of commands. As we move through the text, when I refer to the command line, I’m talking about the Terminal and the location where a user will input the commands.
Understanding how the Terminal works and being able to use the command line is a very powerful tool when working to manipulate files on the Raspberry Pi. Commands can be strung together and input in order to efficiently carry out tasks that other applications cannot. When you initially open LXTerminal, you will see a screen with a blinking cursor. On the left-hand side, there will be a prompt that shows your current username and the hostname of the Pi. Both the username and hostname can be changed later on in settings if you’d like to tailor the Pi further for your uses:

Basic Linux commands
There are basic Linux commands that are going to be very useful in your navigation through your filesystems through the Terminal. In this section, I want to list some essential commands that will help you when building the Magic Mirror. With each command, I’ll provide a brief explanation. As with anything, the best way to learn how to successfully use these commands is with practice. Also, note that syntax is important when working with the command line. The computer interprets capitalized and uncapitalized letters as two different symbols, so we have to make sure we type our commands as they are shown. A good rule of thumb is that if something doesn’t work the first time, go back and proofread what you have typed.
Helpful commands
Here are some helpful Linux or NOOBS commands that will come in handy when you work on your Raspberry Pi:
sudo
: Short for super user do, this command is powerful and necessary. When used before any others in the command line, you're telling the computer that you are running the command as theroot
user. This gives you the ability to alter files that may be unalterable to the regular user on the computer. When first working with the Terminal, I suggest you usesudo
primarily, as opposed tosu
(thoughsu
is needed for particular actions). This will curtail your use of the super user command, putting a slight speed bump between you and any commands that may unintentionally delete necessary files from your system.su
: While similar tosudo
, instead of running a command asroot
,su
makes youroot
. As I said earlier,sudo
is useful for targeted commands, but if you’re working extensively asroot
,su
may be the better option. Just make sure you stay aware that you're working as aroot
user, as you do not want to delete anything necessary in your Raspberry Pi system files.cd
: This changes your location to a directory of your choosing. Remember, a directory is essentially a folder, and this allows you to navigate to a specific folder as long as you know the pathway. Furthermore, if you are in a specific directory and want to return to your/home
directory, typing incd
will bring you immediately back to/home
.cd –
: To build on thecd
command, a useful command is to add the dash after the space aftercd
. This will allow you to immediately return to the previous directory in your pathway, for example,cd /MagicMirror/modules/
. This will bring you to themodules
folder within theMagicMirror
folder. If you want to go back to theMagicMirror
folder, you would then typecd –
.ls
: When you're in a directory and wish to know the folder's contents, typing in this command will list the files within the folder.pwd
: This stands for print working directory. It is very useful if you’ve forgotten your current pathway or need to access that information.mkdir
: This command enables you to create a directory with a name of your choosing.
cp
: This is the copy function. It allows you to copy a file from its source destination to another destination of your choosing.nano
: This command calls upon the Terminal’s nano text editor, enabling you to access and modify the contents of the file from within the Terminal emulator. This is very useful for quick changes to files on the Pi, and I will be using this as the command-line editor for this text.
Let's move forward. I find these to be the most useful commands for this project; however, there is a vast array of commands that will make your navigation more efficient. As you learn more with the Pi, it’s encouraged that you research more commands and how they work in order to maximize your experience in LXTerminal.