Tip

This is the documentation for the 22.02 version. Looking for the documentation of the latest version? Have a look here.

Entering the TNSR CLI

The TNSR CLI can be started a few different ways. The command to start the CLI is /usr/bin/clixon_cli, but the exact method varies, as discussed in this section.

When started, the TNSR CLI will print the hostname followed by the prompt:

tnsr#

From that prompt, commands can be entered to view status information or perform other tasks. Throughout this documentation, the router hostname will typically be omitted unless it is required for clarification.

Using the tnsr account

TNSR includes a tnsr user by default, and this user will automatically load the TNSR CLI at login. To take advantage of this user, login to it directly using ssh, or switch to it using sudo or su from another account.

The behavior of the tnsr account varies by platform, and its password can be reset using any account with access to sudo (See Default Accounts and Passwords).

To switch from another user to the tnsr user, use sudo:

$ sudo su - tnsr

Alternately, use su and enter the password for the tnsr user:

$ su - tnsr
Password:

Using another account

The TNSR CLI can also be started manually from any user.

This command will start the TNSR CLI as the current user, which is ideal to use in combination with NACM:

$ /usr/bin/clixon_cli

Using root

This command will start the TNSR CLI as root, which generally should be avoided unless absolutely necessary (for example, recovering from a flawed NACM configuration):

$ sudo /usr/bin/clixon_cli

Current User

From inside TNSR, check the current user as seen by TNSR with whoami:

tnsr# whoami
  real UID/GID: 996/992
  effective UID/GID: 996/992

  user name: tnsr
  home dir: /var/lib/tnsr
  shell: /bin/bash

Shell Alias

For convenience, the command to launch the TNSR CLI can be added to an alias in the shell. For example, the following line can be added to ~/.bashrc to run TNSR as the current user:

alias tnsrcli='/usr/bin/clixon_cli'

Note

The changes to ~/.bashrc will not take effect immediately. Either logout and login again, or source the file by running source ~/.bashrc or . ~/.bashrc.

Then the TNSR CLI may be accessed using the alias from the shell, tnsrcli.