SphireOS Command Line Interface Reference Guide

This article is for IT Support. 

Warning

Follow the commands in this guide with guidance from a Linewize Support Engineer.

School Manager has a two-part Command Line Interface (CLI): SphireOS (a proprietary product of Linewize) and Bash. You may be familiar with Bash if you have used a Linux terminal. However, the implementation of Bash for School Manager is limited, with most standard Linux/Unix utilities removed. 

Accessing the CLI

Access to the CLI is local only and requires you to connect to the appliance with a keyboard and mouse. Alternatively, SSH access is available to School Manager, provided it has been preconfigured via the cloud interface in Advanced Configuration.

  1. On boot, the School Manager will provide a login prompt to the SphireOS CLI. 
  2. Press Enter to log in. 
  3. If you want to get straight to Bash, type system debug exec bash to switch across. 
  4. From Bash, type exit to switch back to SphireOS.

Warning

School Manager may get stuck in a start-up check mode if cloud connectivity is unavailable, where it will reboot every few minutes to establish a connection. If the device is in this state, you can break out of the start-up checks by entering Ctrl + Alt + Delete.

 

SphireOS Command Reference

Warning

Only use the commands in this guide with guidance from a Linewize Support Engineer.

Description Command
Launch the configuration wizard
config wizard
Check for updates
system update status
Update the School Manager
system update update
Lock SphireOS version to prevent rollback
system layout mark-active-success
To force downgrade/rollback
system layout rollback
Reboot the School Manager
system reboot
Shutdown the School Manager
system shutdown
Reset all settings
config reset

Warning

There is no confirmation for config reset.

Launch a Bash shell
system debug exec bash
Bounce an interface
manage network interface [interface] bounce
Generate debug logs
system debug collect

Generate a coredump

Warning

Do not use this command unless instructed by Linewize support.

system debug forcecrash
Show the available commands
?
Go up a level
..
Exit Bash
exit

 

Bash Command Reference

Warning: Only use the commands on this guide with guidance from a Linewize Support Engineer.
Description Command
Show the status of the network adapters
ip a
Clear an interface configuration
ip addr del [IP Address/Mask] dev [interface name]

Example

ip addr del 192.168.1.1/24 dev eth1
Show the current routes
ip r
Reset the routing table
ip r flush table main
Show the routes for the device (from bash)
ip r get 8.8.8.8
Set a default route
ip r add default via [Gateway IP] dev [interface name]

Example

ip r add default via 172.20.0.1 dev eth3
Remove a default route
ip r del default via [Gateway IP] dev [interface name]

Example

ip r del default via 172.20.0.1 dev eth3
Obtain the last few syslog messages
tail /var/log/syslog
Follow and retry syslog messages
tail -F /var/log/syslog

Info

Continues to display log messages as they are available.

Look for a word in the syslog
tail /var/log/syslog | grep [word]

Example

tail /var/log/syslog | grep cloud
Force upload logs
archivedloguploader
Look for issues in the syslog
grep Fatal /var/log/syslog
Show the content of a URL
curl [URL]

Example

curl https://ifconfig.io/
Check ping Google's DNS IP address
ping 8.8.8.8

Check ping Google's DNS IP address

(with a limit of four packets)

ping 8.8.8.8 -c 4
Check ping Linewize domain
ping linewize.net
Check DNS
cat /etc/resolv.conf
Check you can go to google.com

Basic Check:

curl https://www.google.com


Verbose/Detailed Logging:

curl https://www.google.com -vv
Check for upstream inspection
curl --no-check-certificate https://www.google.com -vv
Check the path to Linewize
traceroute linewize.net
Check the date and time
date
Check the interfaces
ifstat --errors
Obtain command history
history
Obtain current connections
ss
Read the configuration of the device
scat /configuration/sphirewall.conf

 

Further Support

For further support on installing your Linewize appliance, please contact Linewize Support.

 

Was this article helpful?
0 out of 0 found this helpful
Share

Comments

0 comments

Please sign in to leave a comment.