GLORYSmart Safe Client

Linux glossary

The Linux and networking words and commands this documentation uses, explained one by one.

This page explains, in simple words, everything about Linux and networks that appears in this documentation. You do not need to know Linux to install the Smart Safe Client: just copy the commands exactly as they are. If you do not understand a word, look it up here.

To learn more

Each command has a link to its official manual. All the manuals are in English. To learn Linux from scratch, Debian has a guide: GNU/Linux tutorials

The basics

Terminal

The terminal is a window where you type instructions for the computer, instead of using the mouse.

To open it: in the applications menu, open Terminal.

Command

A command is an instruction typed in the terminal. You type it (or paste it) and run it by pressing Enter.

Some commands have more words after them. For example, ls /opt/smart-safe-2 shows what is in the /opt/smart-safe-2 folder.

In this documentation, commands appear in a gray box. Copy them in full, exactly as they are.

Copy and paste in the terminal

In the Linux terminal, the usual shortcuts are different:

ToIn the terminal
PasteCtrl+Shift+V, or right mouse button › Paste
CopyCtrl+Shift+C, or right mouse button › Copy

In the Windows terminal, paste with Ctrl+V or with the right mouse button.

Ctrl+C does not copy in the terminal

In the terminal, Ctrl+C stops the command that is running. Use it only if you want to cancel something.

The password does not appear

When a command asks for the password, it is normal that nothing appears while you type it: no letters, no asterisks. Type it in full and press Enter.

User and root

  • The user is the account you log in to the computer with, for example glory. The Smart Safe Client is installed and runs with the user who will operate it.
  • root is the system administrator: it can change everything. Do not log in with the root account. When a command needs administrator permissions, you use sudo

The computer's user can have the same name as other users in this documentation (for example, glory), but it is a different account: this one belongs to the computer.

Folders and paths

In Linux, the location of a file is written with slashes /. This is called a path.

PathWhat it is
/opt/smart-safe-2/The Smart Safe Client folder.
/home/glory/The personal folder of the user glory.
/etc/The system configuration.
/dev/ttyUSB0The port of a USB-to-serial adapter, for example the DE-70 cable.

Uppercase and lowercase

Linux treats uppercase and lowercase letters as different: License-Request.json and license-request.json are two different files. Type the names exactly as they appear.

Complete with Tab

While typing the name of a folder or a file, press Tab: the terminal completes the rest if it finds it. This avoids typing mistakes.

Networks

See a drawing of a complete network in Remote access over SSH

Router and switch

The router is the device that connects the computers on the customer's network and gives them access to the internet. A switch adds more cable connections to that same network. Computers connected to the same router or switch, by cable or by Wi-Fi, are on the same network.

IP address

It is the “address” of each device on the network: four numbers separated by dots, for example 192.168.0.50.

  • On most customer networks, two devices are on the same network when the first three numbers are the same: 192.168.0.50 and 192.168.0.60 yes; 192.168.0.50 and 192.168.1.60 no.
  • The mask 255.255.255.0 (also written /24, as in 192.168.0.50/24) is what says that the network is the first three numbers.
  • To see it: on Linux, hostname -I; on Windows, ipconfig

DHCP

The automatic way to get an IP address: the router gives one to each device when it connects. It is the usual option (“automatic network”). The address can change after a restart; when it must always be the same, a fixed address is used.

Port

It is a number that tells which service on a computer a connection goes to. For example:

  • 22: SSH.
  • 80: the Smart Safe Client talks to the Cash Infinity (443 when it uses HTTPS).
  • 443: HTTPS, for example the license and the updates.
  • 587 or 465: the e-mail server (SMTP).
  • 55562: the Cash Infinity notifies the Smart Safe Client.

Do not confuse it with the serial port, which is a physical connector (the DE-70's).

HTTPS and certificate

HTTP sends everything as it is: anyone who captures the network traffic can read it. HTTPS sends the same thing encrypted: only the two ends can read it. It uses port 443.

  • Certificate: the digital ID card of the machine that answers HTTPS. The browser shows a warning when it does not know who issued it.
  • Fingerprint (SHA-256): a long code, such as 7C:1F:A0:5E:…:61:D5:3B, that is different for each certificate. The same fingerprint means the same certificate.
  • CA (certificate authority): whoever issues certificates. Some companies have their own CA. A certificate that a machine issued to itself is self-signed. See Certificate authority (CA)

Certificate authority (CA)

The CA (certificate authority) is whoever issues the certificates that others trust, like the office that issues ID cards. Some companies have their own CA.

  • A machine that trusts a CA trusts every certificate that CA issued. That is why you load the CA's file on a machine, and not each certificate.
  • The CA's file usually ends in .crt, .cer or .pem. It has no password, unlike a .p12 file

Client certificate

Usually, only the side that answers HTTPS shows a certificate. With client certification, the side that calls must show one too: the client certificate, the computer's ID card.

On the Cash Infinity it is optional, and most customers leave it off. When the customer turns it on, the machine only accepts the HTTPS connection of a computer that presents a client certificate issued by the CA loaded on it. The customer's IT team issues that certificate and gives it to you in a .p12 file together with its password. Where it goes in the Smart Safe Client: Client certificate

.p12 file

A file that carries a certificate together with its private key: the secret part that proves the certificate belongs to whoever presents it. That is why the file has a password. A .pfx file is the same thing with another ending.

Whoever has the file and its password can pass for that computer: keep them where only the team has access. The Smart Safe Client imports the file in the Cash Infinity's device settings and keeps its own protected copy.

Firewall

A program that decides which connections can come into a computer. Debian and Raspberry Pi OS do not come with an active firewall. On Windows, Windows Defender Firewall must allow incoming TCP on port 55562 (Preparing the Cash Infinity shows how). If the customer's network has its own firewall, it must let the computer out to the internet on port 443 (see Installation)

Preparing the computer

The words from Preparing the computer: installing Debian or Raspberry Pi OS from scratch.

System image (ISO)

A file that contains the installer of an operating system, ready to be written to a USB drive or a card. Debian is downloaded as a file that ends in .iso. Raspberry Pi OS is downloaded and written by Raspberry Pi Imager

Netinst

The small Debian image: it has the minimum and downloads the rest from the internet during the installation. That is why the computer needs internet while it is being installed.

Download it from the official page debian.org/distrib/netinst: under Small CDs or USB sticks, the amd64 link.

Installation USB drive

A USB drive with the system image written on it, which the computer can boot from to install the system. When you write it, everything that was on the USB drive is erased.

Rufus

A Windows program that writes an .iso image to a USB drive. It appears in the language of Windows. It can be downloaded for free from rufus.ie

Boot menu

When you turn on the computer, a key opens a menu to choose what it boots from: the disk or the USB drive. The key depends on the manufacturer; the most common ones are F12, F11 and Esc. It usually appears written on the screen for one or two seconds when the computer turns on. On some computers, the boot device is chosen in the settings (BIOS or UEFI), which open with F2 or Delete.

BIOS and UEFI

The basic settings of the computer, which work before the operating system. Computers from recent years use UEFI; very old ones, BIOS. That is why Rufus asks for the partition scheme:

  • GPT: for UEFI. This is the normal choice.
  • MBR: only for very old computers, if they do not boot with GPT.

GRUB

The program that starts Debian every time the computer is turned on. The Debian installer puts it on the disk.

Mirror

The internet server Debian downloads its programs from. deb.debian.org works in any country.

Raspberry Pi Imager

Raspberry Pi's official program for Windows: it downloads Raspberry Pi OS and writes it to the microSD card, already set up with the user, the password, the network and SSH. It can be downloaded for free from raspberrypi.com/software

microSD

The memory card where the Raspberry Pi keeps its system: it is its “disk”. To write it from a Windows computer, you use a card reader.

Commands

apt

Installs and updates programs from the Debian servers. It needs sudo and internet.

sudo apt update

Updates the list of available programs.

sudo apt install -y nano

Installs the nano program. The -y answers “yes” to the confirmation question. If the program is already installed, nothing bad happens: apt says so.

Official manual: apt

cat

Shows the contents of a file in the terminal, without changing it. Use it to check a file.

cat /opt/smart-safe-2/license-request.json

Official manual: cat

curl

Downloads something from the internet. The installation uses it like this:

curl -fsSL https://api.smartsafe2.com/api/v1/download/install.sh | sudo sh
  • curl -fsSL and the address download the Smart Safe Client installer. The letters -fsSL hide the progress bar, follow redirects and, if the download fails, show the error.
  • The vertical bar | passes what was downloaded to the next command.
  • sudo sh runs the installer as administrator.

If curl: command not found appears, install curl with sudo apt update && sudo apt install -y curl. The && runs the second command only if the first one finished successfully.

Official manual: curl

date

Shows the computer's date and time:

date

If they are wrong, fix them with timedatectl

Official manual: date

dpkg-reconfigure

Opens again the questions a system package asked when it was installed. In this documentation it changes the computer's language:

sudo dpkg-reconfigure locales

Move with the arrow keys, mark with Space, go to Ok with Tab and confirm with Enter.

Official manual: dpkg-reconfigure

exit

Closes the terminal or, if you are connected to another computer over SSH, closes that connection. It also leaves the root account after su -.

hostname

Shows the computer's name. With -I (capital letter i), it shows its IP addresses:

hostname -I

If several appear, the right one is the one that starts the same way as your laptop's.

Official manual: hostname

ip

Shows the computer's network connections:

ip a

Look for inet followed by the IP address, for example inet 192.168.0.50/24. If no connection has inet with an address like that, the computer is not on the network: check the cable or the Wi-Fi.

Official manual: ip

ipconfig (Windows)

It is a Windows command, not a Linux one: it shows the IP address of your laptop. Run it in the Windows terminal and look for IPv4 Address (in Spanish, Dirección IPv4).

ipconfig

Official manual: ipconfig

ls

Shows the files and folders in a folder. Use it to confirm that a file exists.

ls /opt/smart-safe-2

With -l, it shows more details, such as the owner, the size and the date: ls -l /opt/smart-safe-2.

Official manual: ls

nano

A text editor that works inside the terminal. Use it to create or change text files.

To open a file (or create it, if it does not exist):

sudo nano /opt/smart-safe-2/license-request.json

If the file does not exist, nano opens an empty screen and creates the file when you save.

ToPress
Move through the textThe arrow keys
DeleteBackspace (the erase key)
Paste copied textCtrl+Shift+V
SaveCtrl+O and then Enter
ExitCtrl+X

At the bottom, nano shows its shortcuts: the ^ symbol means Ctrl. For example, ^X is Ctrl+X.

If nano asks whether you want to save the changes when you exit, press Y (or S if nano is in Spanish) and then Enter.

If nano is not installed, install it with sudo apt install -y nano (see apt)

Shortcuts for nano: cheat sheet

nmtui

A text menu to connect to the network when there is no desktop, for example to the customer's Wi-Fi:

sudo nmtui

Choose the option to activate a connection, then the Wi-Fi network, and type its password. Move with the arrow keys, choose with Enter and go back with Esc. It works after installing the Smart Safe Client, which puts NetworkManager in charge of the network. You can also connect the Wi-Fi from the Smart Safe Client: Settings › Network › Connections.

Official manual: nmtui

ping

Tests whether another computer answers over the network:

ping 192.168.0.50
  • On Linux, it keeps testing until you press Ctrl+C. Each line with bytes from is an answer.
  • With -c 3, it tests 3 times and stops on its own: ping -c 3 1.1.1.1. 1.1.1.1 is a public internet server, useful to test the connection; 3 received means that the 3 tests came back.
  • On Windows, it tests 4 times and stops on its own. Reply from… means that the other computer answers.

Official manuals: ping on Linux and ping on Windows

raspi-config

Only on the Raspberry Pi: the system configuration menu.

sudo raspi-config

Move with the arrow keys, choose with Enter and use Tab to get to Finish.

Official manual: raspi-config

reboot and poweroff

  • sudo reboot restarts the computer.
  • sudo poweroff turns off the computer.

Official manuals: reboot and poweroff

rm

Deletes files. There is no trash: what is deleted cannot be recovered.

  • Use it only in the commands of this documentation, copied exactly.
  • The asterisk * means “all the ones that start like this”: ssh_host_* is all the files whose name starts with ssh_host_.

Official manual: rm

scp

Copies files over SSH from one computer to another. You write the source first and then the destination; the other computer is written as user@address: followed by the folder:

scp archivo.txt glory@192.168.0.50:/home/glory/

See Remote access over SSH

Official manual: scp

ssh

SSH is the secure way to open the terminal of another computer over the network: what travels is encrypted.

ssh glory@192.168.0.50

Full guide: Remote access over SSH

Official manuals: ssh and SSH on Windows

ssh-keygen

Manages SSH “fingerprints” (identities). This documentation uses it in two ways:

  • On your laptop, to forget the saved fingerprint of a computer that changed: ssh-keygen -R 192.168.0.50.
  • On the Smart Safe Client computer, to create its SSH identity if it is missing: sudo ssh-keygen -A.

Official manual: ssh-keygen

sudo

Runs a command as administrator. You write it before the command, for example sudo reboot.

  • The first time, it asks for the user's password (not root's). Nothing appears while you type it: this is normal.
  • For a few minutes, in the same terminal, it does not ask for it again.
  • Use sudo only in the commands of this documentation: as administrator, a wrong command can damage the system.

If sudo says the user is not in “sudoers”, or “sudo: command not found”

The user does not have administrator permission. This happens when a password was set for root while installing Debian. To give the permission:

  1. Log in as root. It asks for the root password:

    su -
  2. Install sudo, in case it is missing:

    apt install -y sudo
  3. Give the permission to the user. Replace glory with the user's name:

    usermod -aG sudo glory
  4. Restart the computer, still as root:

    reboot

When it comes back, the user can use sudo.

Official manual: sudo

systemctl

Manages services: programs that run in the background, such as the one for SSH

CommandWhat it does
systemctl status sshShows whether the service is active (active (running)). Press q to go back.
sudo systemctl enable --now sshTurns it on now and at every startup.
sudo systemctl disable --now sshTurns it off now and at every startup.
sudo systemctl restart sshRestarts it.

Official manual: systemctl

timedatectl

Sets the time zone and the automatic time.

CommandWhat it does
sudo timedatectl set-timezone America/PanamaSets the country's time zone (in the example, Panama).
sudo timedatectl set-ntp trueTurns on the automatic time from the internet.
timedatectl list-timezonesShows all the zones. Press q to exit.

Some zones: America/Panama, America/Santo_Domingo, America/Bogota, America/Sao_Paulo.

Official manual: timedatectl

truncate

Changes the size of a file. In the cloned image it is used to empty the file that identifies the computer:

sudo truncate -s 0 /etc/machine-id

-s 0 leaves the file empty. When they are turned on, each copy creates its own identity.

Official manuals: truncate and machine-id

usermod

Changes a user account. This documentation uses it to give permission to the serial ports, such as the DE-70's:

sudo usermod -aG dialout $USER
  • -aG dialout adds the user to the dialout group: the users in that group can use the serial ports. Do not forget the a: without it, the user is taken out of their other groups.
  • $USER is replaced automatically with the name of the user who is using the terminal.
  • The permission takes effect after you restart the computer.

The Smart Safe Client installer already gives this permission. You only need this command if the Smart Safe Client says the port is busy.

Official manual: usermod

The Smart Safe Client on Linux

AppImage

On Linux, the Smart Safe Client is a single file: /opt/smart-safe-2/SmartSafe2.AppImage. Updates replace that file on their own.

Kiosk mode

The computer is dedicated to the Smart Safe Client: it logs in on its own with the user and opens the Smart Safe Client in full screen. It is recommended on all computers in production. See Install on Linux

On this page