7 Raspberry Commands That Everyone Should Know for industrial automation

Raspberry Pi automation and usage
June 2, 2021 by
7 Raspberry Commands That Everyone Should Know for industrial automation
Boot & Work Corp. S.L., Fernandez Queralt Martinez


Raspberry Pi is a tiny, dual-display, desktop computer that can be really powerful as a robot brain, smart home hub, media centre, networked AI core, factory controller and much more. 

The industrial Raspberry PLC offers a wide range of possibilities for managing industrial and development environments, as it is open source hardware.

Learn how to make the most of your Programmable Logic Controller with the most useful tools you will find for industrial control! 

Related Links

How to

program Raspberry PLC interrupt inputs with Python


Node-RED tutorial. How to

get GPS coordinates with a Maps Widget with Touchberry Pi


  Raspberry PLC

  Family products


How to

connect a temperature sensor & industrial Raspberry PLC


  Node-RED tutorial.        How to

capture data from the sensor with a Raspberry PLC


Touchberry Pi

Family products


Raspberry Commands

W and last

The W command in Linux is used to show who is logged in and what they are doing. This command displays information about the users currently on the machine and their processes. The header shows, in this order, the current time, how long the system has been running, how many users are currently logged in, and the system load averages for the past 1, 5 and 15 minutes.

It displays who is connected to your Raspberry Pi industrial PLC:


W command

With the last command, show the last login to the system and get more information about who logged in the system to get more security.


Last command


APT keeps a list of software sources on your Raspberry Pi based PLC in a file at /etc/apt/sources.list. Before installing software, you should update your package list with apt update:

sudo apt update
sudo apt install tree -y

Type the command above to make tree available for the user and allow the installation to occur automatically.

Tree is a tiny, cross-platform command-line program used to recursively list or display the contents of a directory in a tree-like format.  Tree is a command-line tool that provides a visualisation of the structure of the current directory and all of its contents. Remember to invoke sudo to run the tree in a directory that requires root user access permissions. Just type:


to run the tree command.

Tree command

For more information about tree command:

man tree


The nmap command (Network Mapper) is a free and open-source tool for network discovery, available for Linux, macOS, and Windows. It is used to determine which hosts are running and which services the hosts are running. Nmap can be a valuable diagnostic tool for network administrators.

Install it from your industrial Raspberry Pi PLC controller:

sudo apt install nmap

Now, type the following to discover which hosts are alive on your network using the -sn flag. This will just ping the hosts specified in the address range.

nmap -sn

Nmap command


The GPIO Pinout is a reference to the Raspberry Pi GPIO pins, and a guide to the Raspberry Pi's GPIO interfaces. Before you can use the pinout tool, you first need to update the package list by running the following command. Next, you can install the package that will provide us with the pinout tool.

sudo apt update
sudo apt install python3-gpiozero

With the package installed, all you need to do is run the following command to get the pinout of the open source PLC Raspberry Pi you are running on.


Pinout command

Finally, what is on the calendar?

Just type the commands below and discover:

  • What day is today on the calendar.

What day is today on the calendar

  • What is on the calendar :)
calendar -f /usr/share/calendar/calendar.lotr -A 365

What is on calendar

Check out for the Most Useful Raspberry Pi Commands

 Read >>>

​Search in our Blog

7 Raspberry Commands That Everyone Should Know for industrial automation
Boot & Work Corp. S.L., Fernandez Queralt Martinez June 2, 2021
Share this post

Looking for your ideal Programmable Logic Controller?

Take a look at this product comparison with other industrial controllers Arduino-based. 

We are comparing inputs, outputs, communications and other features with the ones of the relevant brands.

Industrial PLC comparison >>>