Raspberry Pi Terminal

Command line Or ‘Terminal’ on computer allows user to control over their system. Users of window already used the Command Prompt Or Powershell and other CLI Interfaces, Mac OS users may be familiar with Terminal. All of this tools we can use for Command line programming. Throw with them and their coding knowledge we can control our system. Those commands chain combined together and make complex script (see the Linux usage page on scripting) that can potentially complete taks more efficiently than much larger traditional software packages.

How to open a Terminal window

In Raspberry pi Terminal emulator is daulft using application. The default terminal application is LXTerminal, this means it emulates the old style programming terminals from before the GUI were developed. When Raspberry pi start it looks like this.

 

You should able to see the following prompt:

pi@raspberrypi ~ $

This prompt showing the username and the hostname of the OS.

Pi is the username and the raspberrypi is the hostname.

Now, let’s try running a command type pwd (present working directory) followed by the Enter key. This should display something like /home/pi

Navigating and browsing your PI

This key is also can be used for being able to navigate your file system. Firstly, run the following command: Is –la. After typing this you should see something similar to:

As we know in cmd ‘Cd’ Can be used to change the directory. You can specify the absolute or relative path. So if you want to navigate the this directory python_games you could either do cd /home/pi/python_games or just cd python_games. If you want to go back then you can use this command cd.. and you will be on /home/pi

History and Auto-complete

Rather then type every command we can also just use UP and DOWN key of the keyboard. And if you want to auto-complete any command or file directory then you can press tab button to attempt to auto-complete.

Sudo

When you append sudo to the start of a command and press enter you will be asked for your password, if its correct then you can run command which you want to run using root privileges. Be careful though, some command that require sudo to run can irreparably damage your system so be careful!

Installing Software through APT-GET

You can use this command to download the application rather then the Pi store apt-get. Its allow you to instal, remove or update software packges on your Pi. If you want to instal new packet you can type sudo apt-get install <package-name>. Running sudo apt-get update is use to update all other software of the device, and sudo apt-get remove <package-name> is use to remove a packet.

Hamza Arif
Follow us

Hamza Arif

Hey, i hamza arif student of telecommunication from BZU, i am good in Networking, Telecommunication and Web Development working on different projects and try my best to teach them to all of you.
Hamza Arif
Follow us

One thought to “Raspberry Pi Terminal Basic Configurations”

Leave a comment

Your email address will not be published. Required fields are marked *