.bashrc is the primary configuration file for the bash shell.
1
vote
2answers
17 views
HISTTIMEFORMAT modification. In /etc/bach.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
1answer
15 views
Can't get golang working on Fedora 19
I've installed the golang package on Fedora 19.
Go also needs the the GOPATH variable. I added to my ~/.bashrc:
GOPATH=$HOME/.go/
But go env didn't see it (after the source ~/.bashrc):
...
1
vote
1answer
42 views
Aliases in scripts are not set globally
I know this sound really wierd but this is exactly what happens. I have my .profile and .bashrc file set up in a way that the .bash_aliases file gets executed (checked it with a echo). I do not get ...
4
votes
2answers
108 views
How do I execute a command on login for a system user with no home folder and no personal .bashrc file?
I set these users' home folders through the /etc/passwd file, but when they log in I would like them to activate a python virtualenv. If they had a personal .bashrc file, I'd just include the activate ...
2
votes
2answers
70 views
Bash doesn't read .bashrc unless manually started
bash won't source .bashrc from an interactive terminal unless I manually run bash from a terminal:
$ bash
or manually source it:
$ source ./.bashrc
or running:
$ st -e bash
Here's some useful ...
9
votes
2answers
145 views
bash_history: comment out dangerous commands: `#`
To prevent logging dangerous commands in bash history, I have added following line to my .bashrc file:
HISTIGNORE='rm *:mv *:cp *:cat*>*:pv*>*'
this works well, but it has a side effect: I ...
0
votes
0answers
81 views
Emacs alternate editor client server start
How can I get Emacs to start in server mode with the alternate editor?
From this conversation, I was able to enable the server with the alternate editor. However, I just re-installed emacs and I am ...
3
votes
4answers
115 views
Bash aliases/functions and command line options
I want to set an alias to start nedit together with command line option -noautosave (due to text files up to 500MB). What seemed to be easy:
alias nn="nedit -noautosave $1 &"
just raises some ...
0
votes
1answer
44 views
Adding to PS1 in bash_profile
In my .bash_profile currently, I have PS1='\[\e[1;91m\][\u@\h \w]\$\[\e[0m\] '. I am trying to follow these commands to show branch name on iTerm terminal.
I changed my
PS1='\[\e[1;91m\][\u@\h ...
3
votes
4answers
200 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 ...
0
votes
2answers
49 views
scp from remote host fails due to login greeting set in .bashrc [duplicate]
My simple file scp from a remote host (actually a locally run VM but that shouldn't matter) failed without displaying any error message but clearly not having copied the desired file:
scp ...
2
votes
3answers
88 views
sudo command after long sleep call without re-prompting sudo password
I'm trying to write a simple bash function that sleeps X-number of mins and then runs a system sleep command (for me it's sudo pm-suspend since I'm on Ubuntu) right now the function looks like this:
...
3
votes
3answers
145 views
How to tell if terminal session is running within screen [duplicate]
When running a bash script, I would like to be able to tell if it is running within a screen. Is this possible?
I want this so that .bashrc can set the colour of the command prompt depending on ...
2
votes
2answers
60 views
Preventing accidental directory deletion. Making an alias that contains options?
I use an alias to prevent me from accidentally deleting files, and I would like to do something similar for directories.
For files, I have the following added to my .bashrc:
alias rm="rm -i"
I ...
3
votes
2answers
76 views
How to make .bashrc call dependant on tmux program being installed?
I have a section in my .bashrc that fires up the tmux program (terminal multiplexor).
However if the tmux program isn't installed (say I'm setting up a new computer) then having this in my .bashrc ...