ยง2024-10-02

  1. Using env Command

The env command lists all the environment variables currently defined in your shell session.

  1. Using printenv Command

The printenv command also displays the environment variables.

  1. Using set Command

The set command shows both environment variables and shell functions. It lists all the variables (including local and global) currently defined in the shell.

  1. Using declare Command

You can use the declare command with the -p option to display all variables, including environment variables.


  1. color
$ echo -e "\033[0;33mThis text will be yellow\033[0m"
echo -e "\033[0;33mThis text will be yellow"   <-- without restoring
echo "This is another line of text to test if it's still yellow"