Skip to content

Environment Variables

SHELL

The current shell in use.

bash
printenv SHELL
bash
/bin/bash

HOME

The path to the user's home directory.

bash
printenv HOME
bash
/home/kuga

PWD

The path to the current directory.

bash
printenv PWD
bash
/home/kuga

USER

The current user.

bash
printenv USER
bash
kuga

PATH

The path where executable programs are searched, separated by colons.

bash
printenv PATH
bash
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

SHLVL

The level of the shell, starting from 1.

bash
printenv SHLVL
bash
1