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:
The file can be present in /etc/nish/nishrc where it has global significance. All user instances of the NISH client use the global file.
The file can be present in ~/.nishrc where it has local user significance (the tilde symbol (~) is equivalent to the user’s home directory, or could also be referenced as $HOME/.nishrc). The specific user instance of the NISH client uses the local file. The local file takes precedence over the global file.
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.
Variable | Description | Notes |
---|---|---|
NISH_COLORS |
Specifies the color scheme for the NISH environment, using the same syntax rules as the grep command |
Options:
|
NISH_CONNECTIONS_FILE |
Defines the path to the connections file |
See Connections file |
NISH_CREDENTIAL_CACHE |
Enables the credential cache |
Boolean |
NISH_HOST |
Defines the address of the target node |
— |
NISH_LOCAL_SCHEMA_FILE |
Defines the path to the local schema file |
|
NISH_MANAGER |
Defines the IP address and port number of the NISH manager service in the format IP:PORT |
|
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 |
— |