The bashrc tag has no wiki summary.
2
votes
2answers
78 views
.bashrc and .ssh/ disappearing seemingly at random
I have a server that has been running Fedora 16 ( 3.1.0-7.fc16.x86_64 ) for about a month now. I only log in every few days or weeks, but when I do, sometimes files are missing from my home directory. ...
0
votes
1answer
21 views
Can't get .bashrc to load
I can't get .bashrc to load on this machine... it's SUZE linux 10. I'm a bit frustrated because this seems very basic, create the file and it loads when you open a new shell connection. With the ...
0
votes
0answers
42 views
Why doesnt my new cygwin .bashrc has interactive check work?
I just updated Cygwin and the new .bashrc contains this line right at the top:
echo "BEFORE TEST"
# If not running interactively, don't do anything
[[ "$-" != *i* ]] && return
echo "AFTER ...
1
vote
1answer
132 views
How can I disable CTRL+Z backgrounding in vim or nano?
I'm using stty susp ^- in a user's .bashrc shell in an attempt at preventing users from using CTRL+Z to background a process.
The reason behind this, is that we have a number of users who are used to ...
1
vote
1answer
95 views
Can't change path location of PHP on mac os x snow leopard
I have XAMPP installed on my mac, and I want to make command line PHP use the same executable as XAMPP since I've customized that php's php.ini file.
The php binary I want is located at:
...
0
votes
2answers
131 views
Can't succesffully install RVM in Ubuntu 11
I've installed RVM before in Debian and OSX without any problems, but doing it in Ubuntu is driving me crazy.
I´ve tried different tutorials, this is the last of them. I think everything goes ...
2
votes
2answers
355 views
How do I reset default .bashrc (debian wheezy)? [closed]
I messed up my .bashrc file. How do I get to the default one that was initially created with my home directory?
1
vote
1answer
75 views
export_bashrc() bash function to export .bashrc to a server
I am trying to write a bash function shown below.I am trying to scp my .bashrc to the target
machine.I want to do modify the following function in the below two ways.
1.I want to enter the password ...
1
vote
1answer
74 views
exporting bashrc file over an ssh connection
I have my bashrc file set up to my liking.I usually work on a hardware that is plugged into a remote server.I ssh into that remote server.I would like my .bashrc to be run when I ssh into the remote ...
0
votes
2answers
1k views
Solarized Colour Theme in .bashrc
I am looking to see if there is a way to implement the solarized them through just a .bashrc file. Would it be possible to do so? Has anyone tried this before?
I guess I would start by modifying ...
1
vote
1answer
109 views
.bashrc doesn't get sourced after su'ing to root
I've got a CentOS 5.6 VPS and both root and my normal user account have identical copies of a .bashrc file in their home directories. The file contains a few basic aliases, etc.
If I login to root, ...
0
votes
2answers
143 views
In Linux, how do I umask differently for files and directories?
I wish to have something in my .bashrc that will mask the file permissions as 022 (resulting in new files having permission rwxr--r--) and the directory permissions as 066 (resulting in new ...
3
votes
2answers
227 views
Why is my .bashrc script executing out of order / not waiting for steps to complete?
I have the need for teachers to fill in electronic registers in remote areas, and they need to be able to do it fast and with the least fuss necessary. To accomplish this I have set up netbooks with a ...
0
votes
2answers
183 views
How do you run “source” when starting a shell?
In order to use rvm (https://rvm.beginrescueend.com/), I need to run
source ~/.bash_profile
each time when I start a new shell. How do I automatically do this when I start my computer, rather than ...
-1
votes
3answers
121 views
Set alias or environmental variable in Unix
I have a VPS and an associated IP address for it. I'm doing a lot of work with it in my bash shell and I'm wondering if there's some way I can create either an alias or a environmental shortcut for ...
0
votes
2answers
253 views
In Ubuntu, does updating the CLASSPATH require a reboot?
I changed my CLASSPATH and JAVA_HOME variable to something like this
JAVA_HOME=/usr/local/jdk1.6.0_24
export CLASSPATH=$CLASSPATH:/usr/local/tomcat/lib
export JAVA_HOME
And when I try to compile, ...
0
votes
2answers
141 views
Setting multiple paths to JAVA_HOME in Ubuntu
I am trying to set the JAVA_HOME path in Ubuntu from the .bashrc file
I currently have something like
export JAVA_HOME=/usr/local/jdk1.6.0_24
But I want to also add the servlet libraries in the ...
2
votes
3answers
298 views
How to Add Options to Bash Function
I'm new to linux (using Ubuntu 10.10) and I'd like to add a function to .bashrc that starts/stops a tomcat server. I'm trying to parse two options for the command "tomcat". I've tried the following ...
1
vote
1answer
258 views
Tilde expansion not working when I hit tab on ubuntu 10.10
I try to do this:
cd ~git\t
where the \t is tab character and I expect it to be expanded by bash_completion to this:
cd ~gitolite/
but it doesn't. I've uncommented the following lines in ...
1
vote
2answers
90 views
Alias for Kate editor
How can I create an alias in .bashrc for Kate editor, in order not to write kate file1 file2, but k file1 file2 for opening those files.
1
vote
1answer
247 views
So Close: How to get this SSH login working (.bashrc)
Objective: SSH login ( + eliminate warning message) / run 2 commands / stay logged in:
EDIT: Oops, I made a mistake (see below):
This code does ~95% of what I wanted to do
# .bashrc
# Run two ...
10
votes
7answers
784 views
I screwed up, exit in .bashrc
I put "exit" in my .bashrc file. I don't have physical access to the machine so to connect to it I use ssh. I don't have root privileges. Every time I connect to the server, the connection ...
0
votes
2answers
72 views
Copying user account and all settings?
I recently performed a fresh install of Ubuntu 10.04 and tried to create the username that I wanted to create "Sean.Ochoa" (without the quotes), but it wouldn't let me... saying something about the ...
1
vote
1answer
159 views
sudo as a user that has sudo rights?
Alice has sudo rights.
Bob does not (this is not changeable), but does know the password to Alice's account.
If Bob wants to perform administrative commands he must:
su alice
fill in Alice's ...
1
vote
4answers
403 views
Prune duplicate entries from PATH variable
I modify my .bashrc frequently and then source it. However, when I have things like
export PATH="~/bin:~/perl5/bin:$PATH" in my file, then the PATH environment variable grows every time I source the ...
1
vote
1answer
162 views
Where can $PATH be defined for non-login shell on Red Hat
I need to add a directory to the path for non-login shells on a Red Hat Server.
ssh user@server echo \$PATH
returns
/usr/local/bin:/bin:/usr/bin
How can I add a directory to this path. I ...
4
votes
2answers
259 views
linux: how to permanently and globally change environment variables
I want to do the following for every user that logs into my linux box:
export PATH=$PATH:~/.path
And I don't know how to do that besides manually adding that line in every ~/.bashrc file.
Also, a ...
1
vote
2answers
147 views
change root's .bashrc on a list of hosts
I need a way to log into a list of hostname/IPs as a user, su to root and then create/append root's .bashrc
root doesn't have permission to ssh directly into the server
1
vote
3answers
72 views
3
votes
1answer
265 views
What creates ~/.bashrc
I am setting up a ubuntu web server. Id like to customize everyones bash prompt a bit. (As in $PS1) Editing /etc/bash.bashrc doesn't seem to work, I assume cause ~/.bashrc over writes it. The question ...
0
votes
1answer
55 views
Is there a “pattern” or a group that defines *rc files in *nix environments?
I'm starting to use command line a little more, and I see there are a lot of ways to configure some config files in my $HOME. This is good, since you can customize it the way you really like.
...
5
votes
5answers
3k views
crontab environment
I have written various scripts to launch Java server applications, which are typically run for 24 hours before being shut down (by invoking the same script with a different parameter).
The script ...
0
votes
5answers
660 views
bashrc problem on redhat linux
I am trying to add JAVA_HOME and an updated PATH to my .bashrc file on Redhat Enterprise Linux.
My .bashrc file has only these two lines, but I get the error " : command not found "
#user specific ...
4
votes
4answers
2k views
Prompt customization: how to detect when there is no tty
I have a customized prompt with colors (using tput) and every time I start a non-interactive session in the server I get a bunch of errors.
For instance if I start a non-interactive session like this:
...
3
votes
11answers
4k views
Login without running bash_profile or bashrc
So let's say one typoed something in their .bashrc that prevents him (or her) from logging in via ssh (i.e. the ssh login exits because of the error in the file). Is there any way that person could ...
3
votes
2answers
2k views
.bashrc or .bash_profile for ssh-agent?
Which profile, .bashrc or .bash_profile, is the appropriate spot for ssh-agent? I'm looking for an answer that explains the different between an interactive shell and a login shell.
3
votes
4answers
926 views
How can one set a terminal's title with the 'tput' command?
I discovered through this answer that I've been setting terminal colours in my prompt in a naive way for years.
I've now modified my .bashrc to use 'tput' commands to colourise various elements of my ...
6
votes
4answers
3k views
Why is my .bashrc not read under cygwin?
My .bashrc looks like this:
alias name@server="ssh server sname"
echo "bashrc read"
The echo statement is just for checking if it is read. But the echo does nothing. I want to set an alias for a ...
22
votes
1answer
3k views
What is the difference between a 'Login' and an 'Interactive' bash shell
What is the difference between a ‘Login’ and an ‘Interactive’ bash shell?
I have quoted Wikipedia below but can anybody give a better answer?
EDIT: This is a community wiki so maybe rather than ...
0
votes
3answers
834 views
Changes to /etc/bashrc?
Are there any changes you make to the default bash reconfiguration script that would be helpful for others to know?
Note that /etc/bashrc affects all users, where a .bashrc in a user's home directory ...
90
votes
39answers
10k views
What useful things can one add to one's .bashrc?
Is there anything that you can't live without and will make my life SO much easier? Here are some that I use ('diskspace' & 'folders' are particularly handy).
# some more ls aliases
alias ll='ls ...
0
votes
3answers
2k views
GNU Screen and .bashrc
I am trying to launch GNU Screen using my .bashrc. I'm almost there:
if [ -z "$STY" ]; then
exec screen -dR
else
exec gnome-terminal
fi
This is wrong through! The first case works, screen ...