The tag has no wiki summary.

learn more… | top users | synonyms

35
votes
4answers
2k 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...
18
votes
2answers
3k 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 ...
13
votes
2answers
6k 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: ...
10
votes
2answers
847 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 ...
10
votes
1answer
263 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 ...
8
votes
2answers
3k 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 ...
8
votes
4answers
2k views

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

I want to know the difference between ~/.profile and ~/.bash_profile.
6
votes
5answers
5k 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. ...
6
votes
1answer
225 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 ...
4
votes
2answers
4k views

Why doesn't my ~/.bash_profile work?

I'm using Linux Mint. My login shell (cat /etc/passwd | grep myUserName) is bash. After I start my graphical desktop environment and run terminal emulator from it, I could see that .bash_profile is ...
4
votes
1answer
498 views

What is the difference between .profile and .bash_profile and why don't I have a .profile file on my system?

So I'm pretty new to Linux and recently installed Fedora 19 on my netbook. I want to have a deeper understanding of Linux and the CLI so I'm now reading Learn Linux: The Hard Way. In exercise 3 the ...
4
votes
2answers
3k 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 ...
3
votes
4answers
316 views

Why no shebang in .bashrc/.bash_profile?

Simple inquiry: I have just realized that I have never seen a shebang on top of a .bashrc script, which leads me to think the system uses the default shell to source it upon login (${SHELL}). I am ...
3
votes
2answers
6k 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 ...
3
votes
4answers
235 views

Execute a program at login

I'm running Arch-Linux ARM on a Raspberry Pi. My project goal is to have a barcode scanner attached to the Pi that forwards the scanned messages to a server in a LAN. To harden the system against ...
3
votes
2answers
49 views

184 environment variables too many?

I am trying to find the cause of some OS wonkiness, and am concerned about environment variables. The software I have been handed puts an incredibly high amount of environment variables into the ...
3
votes
1answer
451 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.
3
votes
2answers
248 views

How to load .profile without relogin in AIX?

How can I load my .profile file without a relogin in AIX Server?
3
votes
2answers
162 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
6answers
3k 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 ...
3
votes
2answers
388 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?
3
votes
2answers
15k 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
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
1answer
169 views

A robust way to execute a command/run a script at login?

I have two commands that change keyboard behaviour: xset r rate 120 66 /usr/bin/setxkbmap -option "ctrl:nocaps" When I open a terminal and execute them, they change auto-repeat settings and remap ...
3
votes
1answer
524 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 : ...
3
votes
1answer
3k 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 ...
2
votes
3answers
858 views

How to add a function to .bash_profile/.profile/bashrc in shell?

I have a function which converts epoch time to date. Here is the definition date1(){ date -d @$1 } I'd like to be able to write: $ data1 xxxyyy And I want the corresponding date. I understand ...
2
votes
1answer
939 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
1answer
54 views

Where do I place commands to automatically be exported for all users?

I have an embedded platform running an Arago linux distribution. Right now the only "user" is root but there will eventually be others, but I don't know how many or what user IDs they will have. ...
2
votes
2answers
72 views

Customizing bash for many servers

I work with a few dozen servers. I'd really like to streamline my work, but at the same time I'm a bit reluctant, since it would be a lot of work synchronizing all servers. The servers are in ...
2
votes
2answers
778 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 ...
2
votes
2answers
2k views

Linux (RedHat) `sudo su -l <<user_acct>>` does not source profile

As stated, having trouble with loading the default profile of <<user_acct>> when doing sudo su -l <<user_acct>>. Inside .profile, if [ -r "${HOME}/.profile.custom" ]; then ...
2
votes
1answer
78 views

Message appears after every command completed

I am very new to Linux. Having said this, I had a friend go on my RHEL machine and he somehow added a few random lines in a file, which will post every time I have completed a command. I am not sure ...
2
votes
1answer
1k 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 ...
2
votes
1answer
232 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 ...
2
votes
1answer
861 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 ...
2
votes
1answer
226 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
0answers
112 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 ...
2
votes
2answers
54 views

PS1 variable no longer shows coloured bash prompt

I'm running a VPS with Centos 6.5 I've setup ~/.bash_profile as in the following screenshot: It used to give me an output like this: Now that I've installed WHM/Cpanel I no longer see coloured ...
1
vote
2answers
3k views

Colorful ssh banner

I would like to colorize my ssh banner. I know I can perform it like so: In /etc/profile I can put: echo -e "\e[1;31m Colorful text" echo -e "\e[0m Reset" But I have some ASCII art in the banner ...
1
vote
2answers
10k 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
4answers
83 views

How to add an alias without directly editing the `bash_aliases` file?

Is there a way to add an alias from the command line without directly editing the bash_aliases file? To clarify, how can I make a bash script do it without having to enter something along the lines of ...
1
vote
1answer
55 views

“No such file” warning on terminal launch

I ran a source command on a file that was missing. I forgot about it but later noticed that every time I opened a new terminal, the first line would be a warning about the missing file bash: ...
1
vote
1answer
163 views

How do I track down the source of a ssh login message?

I installed mailutils on my linux machine with Linux Mint 15 (basically Ubuntu 13.04). When I log in, I get the following: Welcome to Linux Mint 15 Olivia (GNU/Linux 3.8.0-32-generic i686) Welcome ...
1
vote
2answers
29 views

Adding script to autostart

I have this script: #! /bin/bash xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync xrandr --addmode DVI-I-1 1920x1080_60.00 xrandr --output DVI-I-1 ...
1
vote
1answer
69 views

.bash_profile alias escape quotes?

On the rare occasion I use the command line, I usually forget syntax. This is one of those times. I want to add a simple alias to my .bash_profile but no matter what quote method I use, I get an ...
1
vote
4answers
282 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 ...
1
vote
1answer
118 views

Where is the .xprofile for Elementary OS Luna

I have this problem similar to this thread. http://askubuntu.com/questions/63863/unknown-monitor-intel-driver-want-to-set-vga-resolution-to-widescreen-tv/154818#154818 it fixed my resolution issue but ...
1
vote
2answers
270 views

HISTTIMEFORMAT modification. In /etc/bash.rc or /etc/profile? [duplicate]

I'd like to add the date/time to the output of the history command in CentOS/RHEL 6. I would like this to apply to all users on the machine by default. This itself is easy. It seems to just be a case ...
1
vote
2answers
171 views

How to make an application run automatically?

I am trying to run my application when a user logs in. So I've added a script in ~/.bash_profile as follows: # for Buluttdepo /usr/bin/myapp > /dev/null 2>&1 & export ...