The tag has no wiki summary.

learn more… | top users | synonyms

16
votes
2answers
14k views

What do the scripts in /etc/profile.d do?

I am reading about basic shell scripting from Linux Command Line and Shell Scripting Bible. It says that the /etc/profile file sets the environment variables at startup of the Bash shell. The ...
3
votes
1answer
264 views

Modifying $HOME variable on a session startup script: Gnome ignores it?

I'm modifying the $HOME variable on a /etc/profile.d script. This seems to be OK for console sessions. There are some caveats on graphical sessions, though: Gnome won't load my desktop ...
2
votes
2answers
2k views

How to write a shell script that gets executed on login in?

I am trying to write bash shell script in Ubuntu 11.10 Linux distro, that will get executed automatically on logging into the system. But I am not able to figure out that what to write in script that ...
10
votes
2answers
1k views

How can I create a clean shell environment for temporary use?

I am a frequent answerer on a Unix-focused popular Q&A site, and in many of my answers I provide examples using the bash shell. However, each time I do this I have to manually go through the ...
0
votes
2answers
1k views

$PATH in /etc/profile not inherited by user shell

I have this in /etc/profile in Fedora 17: PATH=$PATH:"/usr/pgsql-9.2/bin" EDITOR="/usr/bin/emacs -nw" PSQL_EDITOR="/usr/bin/emacs" PAGER="/usr/bin/less" export PATH USER LOGNAME MAIL HOSTNAME ...
4
votes
2answers
6k views

Global bash_profile

I realize there are /etc/profile and /etc/bashrc files for setting global environment variables and maybe I'm just misunderstanding their purposes, but... Is their a global bash_profile file? This ...
2
votes
1answer
2k views

export PATH only once per login in zsh

I need to alter my PATH variable so I put export PATH=$PATH:somedir in my $HOME/.profile which is sourced by my $HOME/.zshrc. This works, yet whenever I open a new terminal (urxvt in X11), .zshrc ...
20
votes
2answers
7k views

how can I use bash as my login shell when my sysadmin refuses to let me change it

The unix sysadmin where I'm working is reluctant to give me access to change my login shell from ksh to bash. He has given various excuses, the funniest being that since they write all their scripts ...
10
votes
1answer
288 views

How do you set up the environment for es?

I've been playing with es the last couple of days, and it (like rc) has the quirk/feature that it only runs its startup script (.esrc) on login. The usual way to run code in each interactive session ...
0
votes
1answer
536 views

add directory to shell profile [duplicate]

Possible Duplicate: How can I make a program executable from everywhere So, I'm new to Linux/Unix and am working in a corporate version of Red Hat at my company. Obviously I don't have full ...
10
votes
4answers
6k views

what is the difference between ~/.profile and ~/.bash_profile

I want to know the difference between ~/.profile and ~/.bash_profile.
2
votes
1answer
285 views

How should I go about setting up vim-pathogen plug-ins for a group as a user with no root permissions?

I do not have root permission on a linux cluster, but I would like to share my vim-plugins to all other members of a linux group using vim-pathogen. We have a group-accessible folder, so that's where ...
3
votes
1answer
2k views

Reload ~/.profile for desktop [duplicate]

Possible Duplicate: how do i tell gnome to reread my ~/.profile How to change environment variables without re-logging to UI? I'm trying to reload my ~/.profile without login out. I can ...
0
votes
2answers
792 views

.profile in SCO

Where can I find the .profile in my user's logon in SCO? I am needing to edit it, so I can add a PATH to it, so that my PATH loads up in start up. I have to add: echo $PATH ... as I have already ...
0
votes
2answers
2k views

How to assign user root rights?

I have Suse Linux on my desktop. So I am root and "normal" user. Frequently e.g. to start tomcat or install/remove a program I should use sudo or switch to super user. But I have defined many aliases ...
1
vote
2answers
18k views

How to set environment variable JAVA_HOME that will be saved on exit? [duplicate]

Possible Duplicate: How do I set a user environment variable? (permanently, not session) I use Suse. First was installed jdk7, so JAVA_HOME remains like: /usr/java/jdk1.7.0_05/ After I ...
1
vote
2answers
2k views

How to execute a function in the .profile file

I have a function which is supposed to remove duplicate copies of directories from my PATH environment variable. I have created some duplicates so I can test it but I don't know how to: 1) put the ...
27
votes
3answers
12k views

What is the difference between ~/.profile, ~/.bashrc, ~/.bash_profile, ~/.gnomerc, /etc/bash_bashrc, /etc/screenrc …?

Answers to the questions on SO and askubuntu, along with poking through (and reading headers of) $HOME and /etc/, indicate a number of files that can be used to set environment variables, including: ...
7
votes
1answer
339 views

How to make linux 'perf record' work for libc and libstdc++ symbols?

I'm using perf record -g on x86-64 Linux to profile a program. Several symbols in libc or libstdc++ have 0 as a parent: __GI___strcmp_ssse3 (libc) and strcmp@plt (libstdc++) for example. (I can ...
0
votes
1answer
233 views

Fedora 7 server export in .bashrc not getting set [duplicate]

I'm trying to set the JAVA_HOME environment variable in my .bashrc but every time I log back in it gets unset again to its original value, below is my .bashrc file # .bashrc # User specific aliases ...
0
votes
2answers
4k views

Trying to set JAVA_HOME in ~/.bashrc

I have added this line at the end of ~/.bashrc export JAVA_HOME=/usr/java/jdk1.5.0_07/bin/java But when I execute echo $JAVA_HOME, I don't get anything as output, I expected ...
0
votes
2answers
677 views

Bash script error trying to find directory of script itself: unexpected end of file

Borrowing graciously from this StackOverflow answer, I want to find the directory a script is running in so I can load relative paths for it on login: The script is pretty small right now: ...
1
vote
2answers
2k views

How to make changes to /etc/profile take effect

I am trying to change $GRAILS_HOME from /usr/grails-1.3.7 to /usr/grails-2.0.0 If I just do export GRAILS_HOME=/usr/grails-2.0.0 it doesn't persist when I log out and back in. I found a line in ...
3
votes
2answers
20k views

Auto running bash script on login

I wanted to make a script which ran automatically on login so I put it into the file ~/bash.profile, but it didnt run. When I put it in bashrc, it ran on opening a terminal. What I was doing in the ...
3
votes
2answers
788 views

Trying to run oprofile on ubuntu kernel but cannot find vmlinux file

I am trying to run oprofile on my ubuntu host but cannot find the vmlinux file. The set up sfor oprofile needs this file: As given here : ...
5
votes
2answers
9k views

How to add home directory path to be discovered by Unix which command?

I have installed node.js at custom location and added the location to the $PATH in .profile file. Hoons-MacBook-Air:npm Eonil$ node --version v0.6.2 Hoons-MacBook-Air:npm Eonil$ which node ...
1
vote
1answer
479 views

How do I set Keyboard and profile preferences when connecting to Solaris via SSH?

I'm connecting to a Solaris box from Mac OS X. Whenever I have connected to linux boxes in the past it has been much easier to navigate around. How do I fix these configuration issues on Solaris? ...
0
votes
1answer
457 views

Variable assignment in .bash_profile has no effect

I added the following to my .bash_profile: JAVA_HOME=$JAVA_HOME:/usr/java/jdk1.7.0 export JAVA_HOME However, when I echo $JAVA_HOME it outputs an empty string. Why weren't my changes to ...
3
votes
2answers
2k views

How to correct a weird bash prompt on a Debian (Squeeze) server?

I have never had to deal much with BASH setup under Debian Linux, but this time, somebody has given me a server that acts weird. When I log on as root, everything works as I am used to: I see a ...
3
votes
2answers
190 views

Execute command on shared account login

At work our team uses a shared account "appadmin" to administer our application. At login, each one of us sources an "aliasrc" file containing his or her preferences. (aliases, display, prompt, ...). ...
3
votes
1answer
4k views

How can I easily copy one user's profile to another's in GNOME?

I have a multi-user environment. I would like them to use one profile (with specific settings like: themes, shortcuts, installed keyboard layouts, wallpaper, main menu items, etc.). Currently I need ...
4
votes
1answer
618 views

Where does /etc/profile file in Debian come from?

Does it belong to some package or is it generated on install time? It looks like it isn't contained in any packages.
2
votes
1answer
1k views

Load my .profile for bash in Emacs terminal buffer? (multi-term mode)

I've got multi-term mode (derived from ansi-term) with bash started in Emacs 23.3, which is a terminal emulator running in Emacs. However, I noticed that it did not load my user profile, including ...
2
votes
0answers
114 views

Why is my PATH not listed in my .bashrc file? [duplicate]

Possible Duplicate: Is it possible to find out which files are setting/adding to environment variables, and their order of precedence? I am a Linux novice. I would like to edit my PATH ...
8
votes
2answers
4k views

How can I change what's displayed at a login shell?

I'm getting more familiar with tweaking the way things look in a shell via the prompt (.bashrc), but I'm now trying to change the initial stuff displayed when I first log in. On my EC2 instance, this ...
0
votes
1answer
115 views

How to change profile to search current directory?

I would like to change my profile so that I can execute programs in the current directory without ./. In other words: $ foo.sh would accomplish what currently happens with: $ ./foo.sh I'm new ...
3
votes
6answers
4k views

ssh user@IP sh <command> missed environment variables

I use an approach ssh user@IP sh [runme.sh] to execute script remotely, this works fine. But I got one problem, that is in runme.sh, I can't get any envirnoment variables which are defined in ...
1
vote
4answers
306 views

linux shell global linux memory in mem variable - from shell

Is there any way for me to set an env variable without editing files to be in memory and effect other shells as well, which will take effect on any new user who connects that machine and will take ...
3
votes
2answers
414 views

How do I profile the kernel?

I'm having issues with a kworker process during system boot and I'd like to get such a nice call graph like Linus Torvalds posted here. How would I do this?
7
votes
5answers
6k views

sh startup files over ssh

I have some important commands I need to execute before any sh shell starts. This is required for passing SSH commands in the SSH command (ssh host somecommand) and other programs that run commands. ...
37
votes
4answers
4k views

Alternative to .bashrc

Is ~/.bashrc the only place where I can specify user specific ENV Variables, aliases, modifications to PATH variable, etc? I ask because it seems that ~/.bashrc would be BASH only...