Linked Questions

74 votes
5 answers
97k views

Environment variable vs Shell variable, what's the difference?

Somebody told me that: BASH isn't an environment variable, it's a shell variable What's the difference?
  • 11.4k
48 votes
9 answers
113k views

'tools.jar' is not in IDEA classpath

I am a new user of Linux, it has been recommended to me by my friend. He told me to install software called IntelliJ Idea IDE. Well I have been following the tutorial. But now when I try to open "...
  • 481
50 votes
3 answers
49k views

Sequence of scripts sourced upon login

I would like to concentrate all my login config in my ~/.bash_profile. There was a ~/.bashrc there by default but I replaced it with a ~/.bash_profile. However, when I log in, something before my ~/....
  • 1,197
14 votes
4 answers
35k views

changing /etc/environment did not affect my environment variables

I'm trying to install Euler expert system following these instructions. To add the environment variable I edited my /etc/environment to become as follows: PATH="/usr/local/sbin:/usr/local/bin:/usr/...
5 votes
1 answer
16k views

List all environment variables, and show if they are exported or not

(This question is similar to this one and this one, but with the added requirement that I would like to know if variables are exported or not) I am in bash, Ubuntu 14.04.4 LTS. I would like to: list ...
  • 778
9 votes
2 answers
5k views

Why aren't variables like $PS1 in printenv?

From what I can tell printenv displays environment variables, but why don't I see other variables like PS1 for customizing the shell prompt? What exactly is printenv outputting and why doesn't it ...
  • 822
7 votes
1 answer
3k views

What is the difference between env, declare and compgen -v?

I see that printenv and env are giving the same output. When digging further for getting the complete list of environment variables, I found declare -xp and the command from here: compgen -v | ...
1 vote
3 answers
896 views

What are the standard Environment variables ($) in Ubuntu?

I know some useful environment-variables like $HOME, $UID, $BASH, $LOGNAME etc. which is useful to get information in terminal/command-line with using echo(ex: echo $LOGNAME) I want to know what are ...
  • 33.5k
1 vote
1 answer
343 views

The nature of echo $COLUMNS

When we execute the command echo $COLUMNS, where is COLUMNS located? I thought it was just an environment variable, but it is not displayed in env.
0 votes
1 answer
329 views

How can I find out the startup files read and environment variables created when Ubuntu was started with graphical interface

In Ubuntu 16.04 with LXDE or Gnome, how can I find out the environment variables created when Ubuntu was started with graphical interface? when Ubuntu was started with graphical interface, which ...
  • 23.6k
0 votes
1 answer
210 views

When I open a terminal and type set I get a strange output

I opened a terminal on the desktop in Xubuntu and typed set and then a new line. I aws expecting to see a display of my environmental variables, but all I got was a display of a lot of code. What on ...