Contents
A list of the commonly used variables in Linux. We use the printf command/echo command to display values of the shell varible in Linux.
Which command is used to display variable values?
Summary:
| Command | Description |
|---|---|
| echo $VARIABLE | To display value of a variable |
| env | Displays all environment variables |
| VARIABLE_NAME= variable_value | Create a new variable |
| unset | Remove a variable |
How do you display a variable in UNIX?
Sh, Ksh, or Bash shell user type the set command. Csh or Tcsh user type the printenv command.