No .bash_profile in 10.6?

Hi all, I need to edit my .bash_profile to install/run some software. Unfortunately, it's not in my home directory like it should be -- I've checked via terminal, turned on invisible files, etc.
Can I simply create a basic text file and call it .bash_profile and include the information I need? thanks.
Jay

this file is not created by default. just create it yourself and put anything you want in it. then quit and restart terminal and it will be sourced.

Similar Messages

  • [SOLVED]Why does .bash_profile seem tobe read in non-login shells too?

    ~/.bash_profile:
    . $HOME/.bashrc
    ~/.bashrc:
    export PATH=$PATH:$HOME/code/shell
    (irrelevant lines left out)
    (I have no ~/.profile, ~/.bash_login or * ~/.bash_logout. I have also never edited /etc/profile or /etc/bash.bashrc.)
    I've read that in a login shell (e.g. TTY1) only the former is read, which in my case sources the latter. Running "export -p" in TTY1 gives a result consistent with this:
    declare -x PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl:/home/lazar/code/shell" (/home/lazar/code/shell is only listed once)
    I've also read that in a non-login shell (e.g. xterm) only the latter is read. However, when I run "export -p" in xterm or urxvt I get an unexpected result:
    declare -x PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl:/home/lazar/code/shell:/home/lazar/code/shell" (/home/lazar/code/shell is listed twice!)
    This implies that ~.bashrc is read twice, perhaps because .bash_profile is read in non-login shells too, even though it shouldn't be, should it? It doesn't seem to matter really, but I can't help but wonder why...
    [EDIT]
    I've found the answer. Exports from .bash_profile are done at boot time and *remain* active while X is active. Opening a non-login shell will cause .bashrc to export as well. Hence the duplication. My solution:
    ~/.bash_profile:
    export PATH=$PATH:$HOME/code/shell
    . $HOME/.bashrc
    ~/.bashrc:
    (lines other than export commands)
    Last edited by Lazar (2011-02-14 07:57:56)

    As I wondered, I think it's a problem with passwd. I don't have a dbus entry and must have missed it when I was copying things around between my version and the .pacnew. Downloading an install disc now since I can't seem to change it from the recovery console due to mounting root read-only.
    I'd love to know of a way to boot that avoids starting dbus and other things that might break while still having read/write access to root. Will mark solved once I update /etc/passwd and reboot.

  • Please post your root's .bashrc and .bash_profile. Mine is gone :-)

    Hi,
    Can someone post their stock .bashrc and .bash_profile files for the root user. I overwrote mine when messing around with the prompt.

    stock .bashrc wrote:
    # Check for an interactive session
    [ -z "$PS1" ] && return
    alias ls='ls --color=auto'
    PS1='[\u@\h \W]\$ '
    stock .bash_profile wrote:. $HOME/.bashrc
    If you want mine, I'm pretty sure they're on my github.
    @jelly: Hey buddy... might wanna check your links. dotfiles has been offline for a while now.

  • Error on .bash_profile _ oracle 11g preparing to install

    Dears,
    I am preparing to install grid oracle 11g , In the envirment varaible on the oracle user on the .bash_profile I got the below error, please help me to solve it :
    ERROR:
    ./.bash_profile
    ': not a valid identifier export: `TMPDIR
    : command not foundne 19:
    ': not a valid identifier export: `ORACLE_HOSTNAME
    ': not a valid identifier export: `ORACLE_UNQNAME
    ': not a valid identifier export: `ORACLE_BASE
    ': not a valid identifier export: `GRID_HOME
    ': not a valid identifier export: `DB_HOME
    ': not a valid identifier export: `ORACLE_HOME
    ': not a valid identifier export: `ORACLE_SID
    ': not a valid identifier export: `ORACLE_TERM
    ': not a valid identifier export: `BASE_PATH
    ': not a valid identifier export: `PATH
    : command not foundne 30:
    ': not a valid identifier export: `LD_LIBRARY_PATH
    : command not foundne 33:
    ./.bash_profile: line 46: syntax error: unexpected end of file
    The file .bash_profile :
    # .bash_profile
    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
         . ~/.bashrc
    fi
    # User specific environment and startup programs
    PATH=$PATH:$HOME/bin
    export PATH
    # Oracle Settings
    TMP=/tmp
    export TMP
    TMPDIR=$TMP
    export TMPDIR
    ORACLE_HOSTNAME=ol6-112-rac1.localdomain; export ORACLE_HOSTNAME
    ORACLE_UNQNAME=RAC; export ORACLE_UNQNAME
    ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
    GRID_HOME=/u01/app/11.2/grid; export GRID_HOME
    DB_HOME=$ORACLE_BASE/product/11.2/db_1; export DB_HOME
    ORACLE_HOME=$DB_HOME; export ORACLE_HOME
    ORACLE_SID=RAC1; export ORACLE_SID
    ORACLE_TERM=xterm; export ORACLE_TERM
    BASE_PATH=/usr/sbin:$PATH; export BASE_PATH
    PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
    CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
    if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
    else
    ulimit -u 16384 -n 65536
    fi
    fi
    alias grid_env='. /home/oracle/grid_env'
    alias db_env='. /home/oracle/db_env'
    Note: I check all directories and all are correct and availabe on the server ( oracle linux server 6.3).
    Appretiate your help .
    Regards
    Salman

    env|sort :
    CLASSPATH=/u01/app/oracle/product/11.2/db_1/JRE:/u01/app/oracle/product/11.2/db_1/jlib:/u01/app/oracle/product/11.2/db_1/rdbms/jlib
    COLORTERM=gnome-terminal
    CVS_RSH=ssh
    DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-c4FSmIcAqV,guid=60fd11073a66582b07812e990000005f
    DESKTOP_SESSION=gnome
    DISPLAY=:0.0
    G_BROKEN_FILENAMES=1
    GDM_KEYBOARD_LAYOUT=us
    GDM_LANG=en_US.UTF-8
    GDMSESSION=gnome
    GNOME_DESKTOP_SESSION_ID=this-is-deprecated
    GNOME_KEYRING_PID=2231
    GNOME_KEYRING_SOCKET=/tmp/keyring-Dgx3GS/socket
    GTK_RC_FILES=/etc/gtk/gtkrc:/home/oracle/.gtkrc-1.2-gnome2
    HISTCONTROL=ignoredups
    HISTSIZE=1000
    HOME=/home/oracle
    HOSTNAME=ol6-112-rac1.localdomain
    LANG=en_US.UTF-8
    LESSOPEN=|/usr/bin/lesspipe.sh %s
    LOGNAME=oracle
    LS_COLORS=rs=0:di=0.... (long words )
    MAIL=/var/spool/mail/oracle
    ORBIT_SOCKETDIR=/tmp/orbit-oracle
    PATH=/u01/app/oracle/product/11.2/db_1/bin:/usr/sbin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin
    PWD=/home/oracle/Desktop
    QTDIR=/usr/lib64/qt-3.3
    QTINC=/usr/lib64/qt-3.3/include
    QTLIB=/usr/lib64/qt-3.3/lib
    SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/2241,unix/unix:/tmp/.ICE-unix/2241
    SHELL=/bin/bash
    SHLVL=2
    SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
    SSH_AUTH_SOCK=/tmp/keyring-Dgx3GS/socket.ssh
    TERM=xterm
    TMP=/tmp
    USERNAME=oracle
    USER=oracle
    _=/usr/bin/env
    WINDOWID=48234500
    WINDOWPATH=1
    XAUTHORITY=/var/run/gdm/auth-for-oracle-Se0hQ1/database
    XDG_SESSION_COOKIE=06a46f0a02fd92da98077e5a00000088-1360773632.745291-1559061973

  • How to create more than one SID in .bash_profile

    I Want to create more than one SID in bash_profile without disturbing oracle's default SID i.e orcl and create database with new SID?

    you can create SID.env file or try to use . oraenv
    eg:-
    $ cat uat1.env
    export ORACLE_BASE=/u01/db/db10g
    export ORACLE_HOME=$ORACLE_BASE/10.2.0
    export PATH=$ORACLE_HOME/bin:$PATH
    export ORACLE_SID=UAT1
    export TNS_ADMIN=$ORACLE_HOME/network/admin
    $ . uat1.env
    $ echo $ORACLE_HOME
    /u01/db/db10g/10.2.0
    $ echo $ORACLE_SID
    UAT1else
    $ . oraenv
    ORACLE_SID = [UAT1] ? UAT1

  • Alias error in bash_profile

    Okay, explain this to me:
    MyMacBook-Pro:~ me$ alias ls='ls -ltr'
    MyMacBook-Pro:~ me$ ls
    total 32
    drwxr-xr-x+ 5 me staff 170 May 26 18:00 Sites
    drwxr-xr-x+ 5 me staff 170 May 26 18:00 Public
    drwx------+ 5 me staff 170 May 26 21:25 Documents
    drwx------+ 4 me staff 136 May 26 22:04 Movies
    [[etc]]
    MyMacBook-Pro:~ jeffshrager$ more dotbashprofile
    alias ls='ls -ltr'
    MyMacBook-Pro:~ me$ source dotbashprofile
    MyMacBook-Pro:~ me$ ls
    ls: illegal option --
    usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]
    So, how come this doesn't work from a sourced alias, but does from the shell. (And, no, it's not that it's doing it twice, as far as I can tell; I can do this in the other order and it's the same -- that is, source and then re-alias from the shell, and the first fails but the second works.)
    Thanks,
    'Jeff

    This question is better asked in the Mac OS X Technologies > Unix Forum
    <http://discussions.apple.com/forum.jspa?forumID=735>
    Where Unix interested users hang out.
    MyMacBook-Pro:~ me$ ls
    ls: illegal option --
    usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]
    normally the illegal option -- is followed by the offending option, but yours is blank.
    I'm wondering if your alias has a non-printing character. Maybe you could display the .bash_profile using
    cat -vte .bash_profile
    which should display all non-printable characters. I would expect your output to look like:
    alias ls='ls -ltr'$
    If there is additional stuff displayed, that might be the problem.

  • Where is my .bash_profile file located?

    I can't locate my .bash_profile file..
    For example, if I try to open my ~/.bash_profile is not created yet...
    Thanks in advance.

    You have to create it, it doesn't exist yet. How you do that is up to you since it is invisible, so even after you do create it you still can't see it. So what you can do is open Terminal.app and say (drag this text into Terminal):
    touch .bash_profile
    then say:
    open -a TextEdit.app .bash_profile
    TextEdit will show you a blank page which you can fill in.

  • Found a swap file by the name ".bash_profile.swp"

    I am new to Mac and trying to figure out why my .bash_profile is not working. As I read suggestions, I try them. Here is my latest issue:
    E325: ATTENTION
    Found a swap file by the name ".bash_profile.swp"
    owned by: Brian dated: Fri Apr 10 22:09:01 2009
    file name: ~Brian/.bash_profile
    modified: YES
    user name: Brian host name: brian-principes-macbook.local
    process ID: 655
    While opening file ".bash_profile"
    (1) Another program may be editing the same file.
    If this is the case, be careful not to end up with two
    different instances of the same file when making changes.
    Quit, or continue with caution.
    (2) An edit session for this file crashed.
    If this is the case, use ":recover" or "vim -r .bash_profile"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file ".bash_profile.swp"
    to avoid this message.
    Swap file ".bash_profile.swp" already exists!
    [O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:
    Any suggestions?

    I am new to Mac and trying to figure out why my .bash_profile is not working. As I read suggestions, I try them. Here is my latest issue:
    E325: ATTENTION
    Found a swap file by the name ".bash_profile.swp"
    owned by: Brian dated: Fri Apr 10 22:09:01 2009
    file name: ~Brian/.bash_profile
    That is NOT a Mac thing, it is an Open Source Vim (which is often the default vi editor) thing. You will get this kind of behavior on any system when using Vim.
    You can get this for 2 reasons. First if you are actually editing this file from another terminal session. Second, if the previous Vim editing session terminated from unnatural causes.
    If you think it was from unnatural causes, then you select Recover. Save your changes :w and exit from the Vim :q
    The next time you launch Vim for that file the .swp file will still exist, but this time you can choose Delete, as you have saved your recovered work the previous session.
    If you are uncomfortable using vi/Vim editors, then may I suggest you try the nano editor. It will get the job done, but unlike Vim, nano is not as overloaded with features that take a long time to learn and master.

  • How can I regain control of .bash_profile after making changes to $PATH?

    Hi,
    Today, I installed Android ADB on my MBP (late 2013) and used the following guide to get it started: http://www.droidviews.com/a-comprehensive-guide-to-adb-android-debug-bridge-and- commands/ - that guide said I should make a change to ~/bash_profile in order to get the settings right. Here's what I did (copied from the link):
    Open terminal window and type following: nano ~/.bash_profile
    This shall open the .bash_profile file. Now enter the following line to define ADB path. export PATH=${PATH}:~/android-sdk-macosx/tools export PATH=${PATH}:~/android-sdk-macosx/platform-tools
    Then, I saved and closed the terminal window.
    Now, I cannot use a lot of terminal commands anymore - sudo, latex, rm, all only give me:
    -bash: latex: command not found
    If I try to access ~/.bash_profile, I get the following error:
    -bash: /Users/richard/.bash_profile: Permission denied
    I tried this:
    RMBP:~ richard$ echo $PATH
    {PATH}:/Users/richard/android-sdk-macosx/platform-tools
    which only shows me that I have changed the path.
    Is there any way I can regain access to the .bash_profile file and control over the Terminal in general?
    Any help would be highly appreciated, thanks in advance!

    I solved the problem, it seems, by doing the following:
    I found the defective .bash_profile file by using Omni Disk Sweeper, and deleted it right away. Someone else here in the support forum had a similar problem and solved it this way, so that's how I got the idea. The Terminal works nicely now and no other signs of trouble have come up yet.

  • Can't create .bash_profile, help pls

    I have macbook pro late 2013 and when I type 'touch ~/.bash_profile' I see:
    touch: /Users/dadetka/.bash_profile: Operation not permitted

    Some of your user files (not system files) have incorrect permissions or are locked. This procedure will unlock all your user files, reset their ownership, and remove their access-control lists. If you've set special values for those attributes, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    Back up all data.
    Step 1
    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. To do that, unlock the preference pane using the credentials of an administrator, check the box marked
    Allow user to administer this computer
    Then reboot. You can demote the problem account back to standard status when this step has been completed.
    Enter the following command in the Terminal window in the same way as before (triple-click, copy, and paste):
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR..; sudo chown -R $UID:staff ~ $_; sudo chmod -R u+rwX ~ $_; chmod -R -N ~ $_; } 2>&-
    This time you'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command may take several minutes to run, depending on how many files you have. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.
    Boot into Recovery. When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open. In that window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window will open. You’re not  going to reset a password.
    Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • Basic ~/.bashrc ~/.bash_profile tips thread

    A lot of this is borrowed from other sites, including the wiki
    This by no means all-inclusive, please add on anything interesting along this topic
    About ~/.bash_profile and ~/.bashrc
    disclaimer:  I don't use ~/.bash_profile or ~/.profile
    there is plenty of documentation on the web on how to use these properly if you're interested
    in fact, my ~/.bash_profile looks like this:
    #!/bin/sh
    ### THIS IS A DUMMY FILE
    ### DON'T NEED TWO FILES TO DO ONE JOB
    ### LET'S CALL ~/.bashrc INSTEAD
    source ~/.bashrc
    Now, if you choose to go this method, there's a little trick you can do to eliminate ~/.bash_profile altogether  :twisted:
    as root create file /etc/profile.d/bashrc.sh with contents:
    #!/bin/sh
    source ~/.bashrc
    AND
    chmod +x /etc/profile.d/bashrc.sh
    Since /etc/profile executes everything in /etc/profile.d/ that is chmod executable, the little script we just created will cause ~/.bashrc to be read on every login... I personally prefer this method to the dummy ~/.bash_profile, but I keep both since I share my /home directory across distributions and not all distros are the same.
    Now, on to the actual ~/.bashrc:
    #!/bin/sh
    ### ALIASES
    alias ls="ls --color"
    alias ll="ls --color -lh"
    alias la="ls --color -a"
    alias pacs="pacsearch"
    alias vim="vim -y"
    alias nano="nano -w"
    ### NICE COLOR BASH PROMPT
    function bash_prompt
    local WHITE="[33[1;37m]"
    local default="[33[0;39m]"
    local BRIGHTGREEN="[33[1;32m]"
    local GREEN="[33[0;32m]"
    local CYAN="[33[0;36m]"
    local GRAY="[33[0;37m]"
    local RED="[33[0;31m]"
    if [ `id -u` != "0" ]; then
    PS1="${GREEN}u${CYAN}@${GREEN}h ${CYAN}w${WHITE} ${default}$ "
    else
    PS1="${RED}u${CYAN}@${GREEN}h ${CYAN}w${WHITE} ${default}$ "
    fi
    bash_prompt
    ### COLORIZE PACMAN (PACS)
    pacsearch () {
    echo -e "$(pacman -Ss $@ | sed
    -e 's#current/.*#\033[1;31m&\033[0;37m#g'
    -e 's#extra/.*#\033[0;32m&\033[0;37m#g'
    -e 's#community/.*#\033[1;35m&\033[0;37m#g'
    -e 's#^.*/.* [0-9].*#\033[0;36m&\033[0;37m#g' )"
    This is really pretty basic.  I use the same ~/.bashrc for all users, including root...
    The alias section is pretty self explanatory, basically the parts in quotations (" ") get run instead of the commands before the equals (=) in every case.
    The bash prompt section is a bit nifty.  The first part, with color definitions, is so that I don't go mad trying to write the actual PS1 line.  Makes it cleaner in my opinion.  There's lots of documentation out there if you're interested in modifying the prompt I have.
    The if/then/else statement in the bash prompt section checks if the user is root.  If not, the username is displayed in GREEN at the prompt.  If the user is root, the username is displayed in RED.  A nice visual reminder, and since I use my ~/.bashrc for ALL users, including root, it helps make the file more portable.
    The last section is taken straight from the Arch wiki.  At the top I aliased 'pacs', which calls this section.  Basically 'pacs' can take the place of 'pacman -Ss' and offer simple colour output.
    http://wiki.archlinux.org/index.php/Col … man_output
    Additions, other bash tips & tricks, comments, all welcome

    I added some comments explaining each piece.
    Misc stuff:
    # My prompt, quite basic, decent coloring, shows the value of $?
    # (exit value of last command, useful sometimes):
    C_DEFAULT="[33[0m]"
    C_BLUE="[33[0;34m]"
    export PS1="$C_BLUE($C_DEFAULT$?$C_BLUE)[$C_DEFAULTu$C_BLUE@$C_DEFAULTh$C_BLUE:$C_DEFAULTw$C_BLUE]\$ $C_DEFAULT"
    export PS2="$C_BLUE> $C_DEFAULT"
    # If you allow Ctrl+Alt+Backspace to kill the X server but are paranoid,
    # then this alias will ensure that there will be no shell open afterwards.
    alias startx="exec startx"
    # Let grep colorize the search results
    alias g="egrep --color=always"
    alias gi="egrep -i --color=always"
    # Hostname appended to bash history filename
    export HISTFILE="$HOME/.bash_history_`hostname -s`"
    # Don't save repeated commands in bash history
    export HISTCONTROL="ignoredups"
    # Confirm before overwriting something
    alias cp="cp -i"
    # Disable ^S/^Q flow control (does anyone like/use this at all?)
    stty -ixon
    # If your resolution gets fucked up, use this to reset (requires XRandR)
    alias resreset="xrandr --size 1280x1024"
    And some small but handy functions:
    # mkmv - creates a new directory and moves the file into it, in 1 step
    # Usage: mkmv <file> <directory>
    mkmv() {
    mkdir "$2"
    mv "$1" "$2"
    # sanitize - set file/directory owner and permissions to normal values (644/755)
    # Usage: sanitize <file>
    sanitize() {
    chmod -R u=rwX,go=rX "$@"
    chown -R ${USER}.users "$@"
    # nh - run command detached from terminal and without output
    # Usage: nh <command>
    nh() {
    nohup "$@" &>/dev/null &
    # run - compile a simple c or cpp file, run the program, afterwards delete it
    # Usage: run <file> [params]
    run() {
    filename="${1%%.*}"
    extension="${1##*.}"
    file="$1"
    shift
    params="$@"
    command=""
    if [ $extension = "cc" -o $extension = "cpp" -o $extension = "c++" ]; then
    command="g++"
    elif [ $extension = "c" ]; then
    command="gcc"
    else
    echo "Invalid file extension!"
    return 1
    fi
    $command -Wall -o $filename $file
    chmod a+x $filename
    ./$filename $params
    rm -f $filename 2>/dev/null

  • I'd like to hide certain mailboxes in my IMAP account (.bash_profile, etc)

    Hi,
    The mailbox list that appears beneath my work IMAP account includes stuff that I don't want to see: eg. .bash_profile, .bashrc, .spamassassin, etc.
    This clutters up the mailboxes that I DO want to see. However, my .mac IMAP only shows the good stuff: Deleted, Drafts, Junk, etc...
    Any thoughts on how to make my work account behave like the .mac one?
    Thanks,
    Jamie

    Hi Jamie.
    Are all the server-stored mailboxes subfolders of a parent folder called “mail” maybe? If that’s the case, you could solve the problem by typing the name of the parent folder (i.e. mail, if that’s how it’s called) in Preferences > Accounts > Advanced > IMAP Path Prefix.

  • Bash_profile in RCA

    Hi Experts,
    I found there are two bash_profile in system for our RAC in linux.
    that means each account in linux have a bash_profile in system?
    Thanks
    JIm

    http://www.comptechdoc.org/os/linux/howlinuxworks/linux_hlbash.html
    if users use bash shell
    oracle:x:500:501::/home/oracle*:/bin/bash*
    when each of user login... it read profile (bash_profile) at $HOME/.bash_profile
    anyway every user on system read "/etc/profile" when login ... as well

  • .bash_profile location

    I installed Oracle Linux 5.7. I need to view the .bash_profile file or whatever file Oracle Linux uses to store the environment variables for a user. I am working with the "oracle" user whose home directory is /home/oracle.
    Connected as "oracle" I issued the "env" command and many variables are shown to have been set already.
    I issue the export command to set the PATH variable and the changes are shown when I issue the "env" command.
    So everything seems to be working but I don't find where all those settings are stored. I went to the /home/oracle directory and I only saw a .bash_history file. So I created a new file named .bash_profile, but the variables are not stored there when I issue the export command. (the file I created was before I noticed that variables are already being set somewhere else - on a file I did not find).
    So where are they ??? The only thing I need to know is how to locate the file the system is using right now to store the environment variables, I supposed it has to be located under the $home directory for the user but it seems it is not that way. Anybody knows something about this ??
    The /etc/profile file I understand is a general file for global settings, so it's not what I'm looking for as far as I know.
    here's the output of the env command issued connected as "oracle" ... I need to know on what file they are stored.
    bash-3.2$ env
    SSH_AGENT_PID=8782
    HOSTNAME=Oracle.Linux
    DESKTOP_STARTUP_ID=
    TERM=xterm
    SHELL=/bin/bash
    HISTSIZE=1000
    KDE_NO_IPV6=1
    GTK_RC_FILES=/etc/gtk/gtkrc:/home/oracle/.gtkrc-1.2-gnome2
    WINDOWID=25165905
    QTDIR=/usr/lib/qt-3.3
    QTINC=/usr/lib/qt-3.3/include
    USER=oracle
    LS_COLORS=
    GNOME_KEYRING_SOCKET=/tmp/keyring-EbBsIZ/socket
    SSH_AUTH_SOCK=/tmp/ssh-OcrBnl8746/agent.8746
    KDEDIR=/usr
    SESSION_MANAGER=local/Oracle.Linux:/tmp/.ICE-unix/8746
    USERNAME=oracle
    MAIL=/var/spool/mail/oracle
    PATH=/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
    DESKTOP_SESSION=default
    GDM_XSERVER_LOCATION=local
    INPUTRC=/etc/inputrc
    PWD=/home/oracle
    XMODIFIERS=@im=none
    KDE_IS_PRELINKED=1
    LANG=en_US.UTF-8
    GDMSESSION=default
    SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
    SHLVL=2
    HOME=/home/oracle
    GNOME_DESKTOP_SESSION_ID=Default
    LOGNAME=oracle
    QTLIB=/usr/lib/qt-3.3/lib
    CVS_RSH=ssh
    DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-dgt3DUIWif,guid=bb5dcea335860598b6a290004f42d4f7
    LESSOPEN=|/usr/bin/lesspipe.sh %s
    DISPLAY=:0.0
    G_BROKEN_FILENAMES=1
    COLORTERM=gnome-terminal
    XAUTHORITY=/tmp/.gdmR05GAW
    _=/usr/bin/env
    bash-3.2$

    GabyPR wrote:
    I installed Oracle Linux 5.7. I need to view the .bash_profile file or whatever file Oracle Linux uses to store the environment variables for a user. I am working with the "oracle" user whose home directory is /home/oracle.
    Connected as "oracle" I issued the "env" command and many variables are shown to have been set already.
    I issue the export command to set the PATH variable and the changes are shown when I issue the "env" command.
    So everything seems to be working but I don't find where all those settings are stored. I went to the /home/oracle directory and I only saw a .bash_history file. So I created a new file named .bash_profile, but the variables are not stored there when I issue the export command. (the file I created was before I noticed that variables are already being set somewhere else - on a file I did not find).
    They aren't 'stored' anywhere. Well, they are stored in memory, for the session in which the 'export' command was executed. The .profile (or .bash_profile) is executed by the OS when the owning user first logs on. It is not (as your question seems to imply) updated when you execute an 'export' command. You need open the .profile and put those export commands into the file, so that they get executed when you log on.
    So where are they ??? The only thing I need to know is how to locate the file the system is using right now to store the environment variables, I supposed it has to be located under the $home directory for the user but it seems it is not that way. Anybody knows something about this ??
    The /etc/profile file I understand is a general file for global settings, so it's not what I'm looking for as far as I know.
    here's the output of the env command issued connected as "oracle" ... I need to know on what file they are stored.
    bash-3.2$ env
    SSH_AGENT_PID=8782
    HOSTNAME=Oracle.Linux
    DESKTOP_STARTUP_ID=
    TERM=xterm
    SHELL=/bin/bash
    HISTSIZE=1000
    KDE_NO_IPV6=1
    GTK_RC_FILES=/etc/gtk/gtkrc:/home/oracle/.gtkrc-1.2-gnome2
    WINDOWID=25165905
    QTDIR=/usr/lib/qt-3.3
    QTINC=/usr/lib/qt-3.3/include
    USER=oracle
    LS_COLORS=
    GNOME_KEYRING_SOCKET=/tmp/keyring-EbBsIZ/socket
    SSH_AUTH_SOCK=/tmp/ssh-OcrBnl8746/agent.8746
    KDEDIR=/usr
    SESSION_MANAGER=local/Oracle.Linux:/tmp/.ICE-unix/8746
    USERNAME=oracle
    MAIL=/var/spool/mail/oracle
    PATH=/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
    DESKTOP_SESSION=default
    GDM_XSERVER_LOCATION=local
    INPUTRC=/etc/inputrc
    PWD=/home/oracle
    XMODIFIERS=@im=none
    KDE_IS_PRELINKED=1
    LANG=en_US.UTF-8
    GDMSESSION=default
    SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
    SHLVL=2
    HOME=/home/oracle
    GNOME_DESKTOP_SESSION_ID=Default
    LOGNAME=oracle
    QTLIB=/usr/lib/qt-3.3/lib
    CVS_RSH=ssh
    DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-dgt3DUIWif,guid=bb5dcea335860598b6a290004f42d4f7
    LESSOPEN=|/usr/bin/lesspipe.sh %s
    DISPLAY=:0.0
    G_BROKEN_FILENAMES=1
    COLORTERM=gnome-terminal
    XAUTHORITY=/tmp/.gdmR05GAW
    _=/usr/bin/env
    bash-3.2$

  • Help Me with .bash_Profile

    Hey,Guys!
    I became interested in the development of AdiumX. I have met the following problem while trying to configure the subversion installed.
    According to the instructions given by the Official AdiumX website:
    "=== Putting SVN in your path ===
    ''Note: These instructions are for `bash`, the default shell on Panther and Tiger.''
    You will need to add {{{/usr/local/bin}}} to your path. To do this, run the following commands in a Terminal window:
    * {{{touch ~/.bash_profile}}}
    * {{{open -e ~/.bash_profile}}}
    This will open the ~/.bash_profile in !TextEdit. ''Note that it's perfectly fine for this file to be empty.''
    Now add the following line to the file:
    {{{export PATH=$PATH:/usr/local/bin}}}
    Save and close the file, then close your Terminal window and open a new one. SVN should now be installed and configured correctly. Please continue to the next section for more information on how to install Adium from source.
    But the very file, which need to be modified, is actually set to be invisible and has the permission attributes " owner:root(0) read & write ; group:wheel(0) read ; others read". I can't simply modify and save the file to a different directory, then drag it back into [/usr/local/bin] to replace the old one.
    So could anyone come by telling me how to "add the following line to the file:
    {{{export PATH=$PATH:/usr/local/bin}}}
    Save and close the file" ?
    Thank you for coming by!

    * {{{touch ~/.bash_profile}}}
    This should create a ".bash_profile" file in your home_folder (not in /usr/local/bin). That's what the tilde "~" represents.
    But the very file, which need to be modified, is
    actually set to be invisible and has the permission
    attributes " owner:root(0) read & write ;
    group:wheel(0) read ; others read". I can't simply
    modify and save the file to a different directory,
    then drag it back into [/usr/local/bin] to replace
    the old one.
    The file will be invisible. Filenames that begin with a period "." in Unix are typically not displayed in the GUI.
    As I noted above, the touch command should've created the file in your home folder, not in /usr/local/bin. You want to edit/save the one in your home folder. There should be no reason to "drag it back into [/usr/local/bin] to replace the old one".
    Steve

Maybe you are looking for

  • How to handle multiple exceptions by the same code?

    Hi, all: In my situation I want AException and BException handled by the same code, while CException and DException handled by another code. How can I write my try-catch code in a simple way? Of course I can do the following: public void TheMainFunct

  • Xml file and flvplayback AS2

    I'm using the flvplayback component that came with Flash CS4. To use with an xml file, it indicates that all I need to do is to enter the name of the file in the contentPath, which I have done (videostest.xml) Both Flash file, html file and xml file

  • My ZTE OPEN C reboot randomly

    My phone is OPEN ZTE C (bougth in France) My OS version is 1.3 Sometimes, firefox OS restart when hit was in stand by. I don't know why. No application are opened when the problem came.. I have the model since 1 month and it reboot 5 times.

  • On-screen CID and remote access

    Since the change to DST I have lost the on-screen CID and can no longer access my DVR remotely (through MYVERIZON site).  Have done the usual running the fix DVR issues, rebooting, and CID troubleshooter. If I disable and re-enable CID I get a meassa

  • Restoring from Lacie backup

    BACKGROUND: I'm having some issues with my G5 and I'm going to be taking it in for service. Due to the nature of the service it will probably be in the shop for a bit so I want to move all my data to a MAC Mini that I just picked up. I'm mainly conce