LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-11-2017, 01:14 AM   #1
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Rep: Reputation: Disabled
Missing environmental variables in CentOS7?


Code:
[root@centos7-1024ram-minimal ~]# cat /etc/environment 
#Returns nothing.
~/.bash_profile is the place for
user specific environment and startup programs.
E.g. Adding a new path to PATH variable.
So PATH was defined before .bash_profile is executed.

Since /etc/environment is empty,
but command env produces a lot of
environmental variables.
Where were those env variables defined?

Thank you.
 
Old 04-11-2017, 02:40 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 13,400
Blog Entries: 9

Rep: Reputation: 3655Reputation: 3655Reputation: 3655Reputation: 3655Reputation: 3655Reputation: 3655Reputation: 3655Reputation: 3655Reputation: 3655Reputation: 3655Reputation: 3655
all over the place, is my guess.
and as you can see from the output.
certain shells have the ability to define persistent environment variables, i think they're called login shells.
everything that a login shell parses. (i hope i'm right with this, it's sort of "felt" knowledge)
good starting point: /etc/bash.bashrc /etc/profile, and the same for your $HOME
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting environmental variables Ninju Linux - Newbie 3 09-25-2007 05:29 PM
Environmental Variables danglingpointer Slackware 13 01-06-2005 01:36 AM
environmental variables msound Programming 0 08-21-2004 08:06 PM
environmental variables? blackzone Linux - General 1 08-06-2004 04:44 AM
environmental variables mbhenry Linux - General 6 09-18-2003 12:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration