Home » Questions » Computers [ Ask a new question ]

What is causing all these "declare -x …" lines when I open a terminal?

What is causing all these "declare -x …" lines when I open a terminal?

When I open a terminal on my Fedora machine (or ssh into it), I get a bunch of lines like this before the prompt:

Asked by: Guest | Views: 338
Total answers/comments: 2
Guest [Entry]

"Run

env - HOME=""$HOME"" /bin/bash --login -xv 2>&1 | tee foo

to startup bash in verbose mode. This will print every line of initialization file as it is read, and every line of initialization file as it is executed, copying the output to a file called foo. Then you can look in foo to see what’s causing declare -x to be called."
Guest [Entry]

"Yes, it is likely that it is coming from your .bashrc because you edited it. You may have introduced a syntax error in the script which could cause that to be output.

You can make sure that these lines exist in your .bashrc by typing:

grep declare ~/.bashrc

You should see at least those 4 lines printed out to the console. You can also try running your .bashrc script from the prompt and seeing if any errors are output:

bash ~/.bashrc"