Issue
When I open my terminal (bash) on ubuntu 22.04.1 it prints the folowing:
declare -x COLORTERM="truecolor"
declare -x DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"
declare -x DESKTOP_SESSION="ubuntu"
declare -x DISPLAY=":0"
declare -x GDMSESSION="ubuntu"
declare -x GNOME_DESKTOP_SESSION_ID="this-is-deprecated"
declare -x GNOME_SETUP_DISPLAY=":1"
declare -x GNOME_SHELL_SESSION_MODE="ubuntu"
declare -x GNOME_TERMINAL_SCREEN="/org/gnome/Terminal/screen/848af9de_d3e6_4859_8e74_6089fc1b0105"
declare -x GNOME_TERMINAL_SERVICE=":1.204"
declare -x GTK_MODULES="gail:atk-bridge"
declare -x HOME="/home/dennis"
declare -x IM_CONFIG_PHASE="1"
declare -x LANG="en_US.UTF-8"
declare -x LC_ADDRESS="pt_BR.UTF-8"
declare -x LC_CTYPE="pt_BR.UTF-8"
declare -x LC_IDENTIFICATION="pt_BR.UTF-8"
declare -x LC_MEASUREMENT="pt_BR.UTF-8"
declare -x LC_MONETARY="pt_BR.UTF-8"
declare -x LC_NAME="pt_BR.UTF-8"
declare -x LC_NUMERIC="pt_BR.UTF-8"
declare -x LC_PAPER="pt_BR.UTF-8"
declare -x LC_TELEPHONE="pt_BR.UTF-8"
declare -x LC_TIME="pt_BR.UTF-8"
declare -x LESSCLOSE="/usr/bin/lesspipe %s %s"
declare -x LESSOPEN="| /usr/bin/lesspipe %s"
declare -x LOGNAME="dennis"
How can I make it stop printing all the variables each time I open a new terminal?
Solution
The problem is at the very end of the file:
export
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:~/.npm-global/bin
The newline after export
makes it output all the exported variables. $PATH
is then populated without export, but probably exported anyway because it's been exported already from a .profile
or similar.
Answered By - choroba Answer Checked By - Robin (WPSolving Admin)