NISH rc files

NISH provides the ability to place commonly used attributes into one or more run command (rc) files. A NISH rc file defines variables used when starting the NISH client on the command line. When a NISH rc file is present, the user does not need to enter the defined variables manually on the command line.

After the NISH client installation, there is an example NISH rc file in /etc/nish/nishrc.

A NISH rc file can be located in the file system as follows:

A user can also set the variables supported in the NISH rc file as Linux environment variables. The user-defined environment variables take precedence over the local and central NISH rc file.

User-specific command line arguments take precedence over all variables defined in the global file, the local file, or in user-defined environment variables.

Table 1 describes the supported variables in a NISH rc file.

Table 1. NISH rc file variables
Variable Description Notes

NISH_COLORS

Specifies the color scheme for the NISH environment, using the same syntax rules as the grep command

Options:

  • mo — mode

  • co — context

  • uc — uncommitted changes

  • cs — card slot

  • un — username

  • at — at (@)

  • sn — system name

  • pc — prompt character

  • er — error message

  • if — info message

  • wa — warning message

  • nt — normal text

NISH_CONNECTIONS_FILE

Defines the path to the connections file

See Connections file

NISH_CREDENTIAL_CACHE

Enables the credential cache

Boolean

See Authentication credentials

NISH_HOST

Defines the address of the target node

NISH_LOCAL_SCHEMA_FILE

Defines the path to the local schema file

See Local schema file

NISH_MANAGER

Defines the IP address and port number of the NISH manager service in the format IP:PORT

See Using the NISH client in 1:n manager mode

NISH_PORT

Defines the port of the target node

NISH_SERVER_CACHE_PATH

Defines the location of the cached downloaded device schemas

NISH_USER

Defines the username that used to connect with the target node