Homebreadcumb forward arrow iconBlogbreadcumb forward arrow iconArtificial Intelligencebreadcumb forward arrow iconRaspberry Pi Commands: General, Networking, Internet, File & System Information

Raspberry Pi Commands: General, Networking, Internet, File & System Information

Last updated:
18th Dec, 2020
Read Time
6 Mins
share image icon
In this article
Chevron in toc
View All
Raspberry Pi Commands: General, Networking, Internet, File & System Information

The Raspberry Pi is an easy, charge card measured PC that connects to a PC screen or TV, and utilises a standard console and mouse. It is an able little gadget that empowers individuals, all things considered, to investigate processing, and to figure out how to program in dialects like Scratch and Python.

Top Machine Learning and AI Courses Online

What is Raspberry Pi?

Getting your Raspberry Pi ready for action is pretty simple—and whatever venture you’re doing, there’s presumably a guide that can walk you through the cycle. Be that as it may, a couple of devices and terminal commands you’ll use in pretty much every Pi attempt. 

Trending Machine Learning Skills

Ads of upGrad blog

Enrol for the Machine Learning Course from the World’s top Universities. Earn Masters, Executive PGP, or Advanced Certificate Programs to fast-track your career.

Since most Pi ventures run on Linux, having some command-line hacks makes the Pi a lot simpler to work with. In any case, regardless of whether you’re not a Linux veteran, these commands can encourage you a great deal as you tinker, so it’s a smart thought to get comfortable with them now.

What are the Raspberry Pi Commands?

The Raspberry Pi is an easy, charge card measured PC that connects to a PC screen or TV, and utilises a standard console and mouse. It is an able little gadget that empowers individuals, all things considered, to investigate processing, and to figure out how to program in dialects like Scratch and Python.

How would I utilise the Raspberry Pi command line? 

Open Raspberry Pi Configuration (Menu > Preferences > Raspberry Pi Configuration). Change the Boot setting ‘To CLI’ and snap OK. Presently when you reboot, you’ll start in the command line (enter startx to boot into the work area).

General Commands

apt-get update: Updates the rundown of bundles on your framework to the rundown in the vaults. Use it before putting in new bundles to ensure you are introducing the most recent form.

apt-get upgrade: Redesigns the entirety of the product bundles you have introduced. 

startx: Opens the Graphical User Interface.

clear: Clears recently run orders and text from the terminal screen. 

date: Prints the current date.

find / -name text1.txt: Searches the whole system for the file text1.txt and outputs a list of all directories that contain the file.

reboot: To reboot immediately.

nano text.txt: Opens the file text.txt in the Linux text editor Nano.

poweroff: To shutdown immediately.

raspi-config: Opens the configuration settings menu.

shutdown -h now: To shutdown immediately.

shutdown -h 11:11: To shutdown at 11:11 AM.

File And Directory Commands

mv YYY:  Moves the file or directory named YYY to a specified location. 

rm text.txt: Deletes the file text.txt.

rmdir a_directory: Deletes(if it is empty) the directory a_directory .

cat text.txt:  Displays the contents of the file text.txt.

cd /abc/xyz: Changes the current directory to the /abc/xyz directory.

cp XXX: Copies the file or directory XXX and pastes it to a specified location

mkdir text_directory:  Creates a new directory named text_directory inside the current directory.

scp user@ Copies a file over SSH. Can be used to download a file from a PC to the Raspberry Pi. user@ is the username, and local IP address of the PC, and /some/path/text.txt is the path and file name of the file on the PC.

touch text.txt: Creates a new, empty file named text.txt in the current directory.

ls -l: Lists files in the current directory, along with file size, date modified, and permissions.

Networking and Internet Commands

ifconfig: To check the status of the remote association you are utilising (to check whether wlan0 has obtained an IP address). 

ping: Tests availability between two gadgets associated with an organisation. For instance, ping will send a parcel to the gadget at IP and sit tight for a reaction. It additionally works with site addresses. 

wget Downloads the file text.txt from the web and saves it to the current directory.

iwconfig: To check which network the wireless adapter is using.

iwlist wlan0 scan: Prints a list of the currently available wireless networks.

iwlist wlan0 scan | grep ESSID: Use grep along with the name of a field to list only the fields you need 

Nmap: Sweeps your organisation and records associated gadgets, port number, convention, state (open or shut) working framework, MAC addresses, and other data.

Also Read: Raspberry Pi Project Ideas

System Information Commands

cat /proc/meminfo:  Shows details about your memory.

cat /proc/partitions:  Shows the size and number of partitions on your SD card or hard drive.

cat /proc/version:  Shows you which version of the Raspberry Pi you are using.

df -h:  Shows information about the available disk space.

free:  Shows how much free memory is available.

hostname -I:  Shows the IP address of your Raspberry Pi

lsusb:   Lists USB hardware connected to your Raspberry Pi

UP key: Pressing the UP key will print the last command entered into the command prompt. This is a quick way to repeat previous commands or make corrections to commands.

df /: Shows how much free disk space is available.

Must Read: Raspberry Pi IoT Projects

vcgencmd measure_temp: Shows the temperature of the CPU.

vcgencmd get_mem arm && vcgencmd get_mem gpu: Shows the memory split between the CPU and GPU.

dpkg – -get-selections | grep XXX: Shows all of the installed packages that are related to XXX.

dpkg – -get-selections: Shows all of your installed packages.

Each command can do a lot more of what I have shown here. To check out what more it can do, try “–help” after the command. 

Ads of upGrad blog

Popular AI and ML Blogs & Free Courses


For some individuals, command-line access on any stage is scary. The helpful commands recorded here are an endeavour to give the Raspberry Pi newcomer the absolute minimum, to begin with, the terminal, a little stepping stone to progress with whichever Pi venture they choose to begin.

Also, If you’re interested to learn more about Raspberry Pi, machine learning, check out IIIT-B & upGrad’s PG Diploma in Machine Learning & AI which is designed for working professionals and offers 450+ hours of rigorous training, 30+ case studies & assignments, IIIT-B Alumni status, 5+ practical hands-on capstone projects & job assistance with top firms.


Pavan Vadapalli

Blog Author
Director of Engineering @ upGrad. Motivated to leverage technology to solve problems. Seasoned leader for startups and fast moving orgs. Working on solving problems of scale and long term technology strategy.
Get Free Consultation

Select Coursecaret down icon
Selectcaret down icon
By clicking 'Submit' you Agree to  
UpGrad's Terms & Conditions

Our Popular Machine Learning Course

Frequently Asked Questions (FAQs)

1What are the limitations of using the Raspberry Pi?

Since the Raspberry Pi lacks an internal hard drive, it relies on an SD card to store its data. On the Raspberry Pi, it is not feasible to perform all of the things that a desktop computer can do. It lacks heat sinks, which makes it susceptible to overheating. Crashing and bug faults have also been reported by users. Other operating systems, such as Windows, are incompatible with it.

2What are the pros of using the Raspberry Pi?

Since the Raspberry Pi has a large number of GPIO pins, it can accommodate numerous sensors at once. It has a speedier CPU, which guarantees that it will perform well. It is appropriate for small businesses because it requires little expenditure to operate. The Raspberry Pi does not require much programming knowledge, making it incredibly user-friendly.

3What is meant by Noobs Raspberry?

NOOBS is a Raspberry Pi-developed OS installation software. It comes with a pre-installed operating system for the Raspberry Pi. LibreElec, a stripped-down version of Linux with the Kodi media center software installed, is also included on the NOOBS card. NOOBS allows users to install and reinstall one or more operating systems, as well as set the default operating system. NOOBS includes the Raspberry Pi OS and LibreELEC operating systems. It also offers a variety of alternative operating systems that can be downloaded and installed from the internet.

Explore Free Courses

Suggested Blogs

Top 5 Image Processing Projects Ideas & Topics [For Beginners]
In this blog, we will walk through the introduction of image processing and then proceed to talk about a few project ideas that revolve around image p
Read More

by Pavan Vadapalli

30 Nov 2023

Data Preprocessing in Machine Learning: 7 Easy Steps To Follow
Summary: In this article, you will learn about data preprocessing in Machine Learning: 7 easy steps to follow. Acquire the dataset Import all the cr
Read More

by Kechit Goyal

29 Oct 2023

Natural Language Processing (NLP) Projects & Topics For Beginners [2023]
What are Natural Language Processing Projects? NLP project ideas advanced encompass various applications and research areas that leverage computation
Read More

by Pavan Vadapalli

04 Oct 2023

15 Interesting MATLAB Project Ideas & Topics For Beginners [2023]
Learning about MATLAB can be tedious. It’s capable of performing many tasks and solving highly complex problems of different domains. If youR
Read More

by Pavan Vadapalli

03 Oct 2023

Top 16 Artificial Intelligence Project Ideas & Topics for Beginners [2023]
Summary: In this article, you will learn the 16 AI project ideas & Topics. Take a glimpse below. Predict Housing Price Enron Investigation Stock
Read More

by Pavan Vadapalli

27 Sep 2023

Top 15 Deep Learning Interview Questions & Answers
Although still evolving, Deep Learning has emerged as a breakthrough technology in the field of Data Science. From Google’s DeepMind to self-dri
Read More

by Prashant Kathuria

21 Sep 2023

Top 8 Exciting AWS Projects & Ideas For Beginners [2023]
AWS Projects & Topics Looking for AWS project ideas? Then you’ve come to the right place because, in this article, we’ve shared multiple AWS proj
Read More

by Pavan Vadapalli

19 Sep 2023

Top 15 IoT Interview Questions & Answers 2023 – For Beginners & Experienced
These days, the minute you indulge in any technology-oriented discussion, interview questions on cloud computing come up in some form or the other. Th
Read More

by Kechit Goyal

15 Sep 2023

45+ Interesting Machine Learning Project Ideas For Beginners [2023]
Summary: In this Article, you will learn Stock Prices Predictor Sports Predictor Develop A Sentiment Analyzer Enhance Healthcare Prepare ML Algorith
Read More

by Jaideep Khare

14 Sep 2023

Schedule 1:1 free counsellingTalk to Career Expert
footer sticky close icon