Questions tagged [bashrc]
The Bashrc file is used by the Bourne Again Shell in Unix/Linux to set environment variables and run commands.
15
questions with no upvoted or accepted answers
4
votes
1
answer
7k
views
Scripts in /etc/profile.d are being executed twice on login
Background Info:
I am trying to configure a Linux server running CentOS 7 for multiple users. After installing java I want to globally set the $JAVA_HOME environment variable for all users and add it ...
2
votes
0
answers
168
views
How to auto init direnv on Google Cloud Shell?
my .bashrc has these lines at the bottom:
if [ -f $HOME/tools/bashrc ]; then
source $HOME/tools/bashrc
fi
and $HOME/tools/bashrc has this code at the bottom:
eval "$(pyenv init -)"
pyenv ...
2
votes
0
answers
2k
views
EC2 - editing .bashrc causes terminal to hang and checks to fail
I've been testing this for the past few hours with no luck. When launching an Ubuntu 12.04 EC2 micro instance, I SSH to it, create a new user and continue with installing Ruby version manger under ...
1
vote
0
answers
76
views
How to tell screen use use different bash_profile?
How can I tell to screen to use different bash_profile? Problem is we use a technical user to log in, but I edited a custom PS1.
Normally I login with putty like:
ssh user@host -t "bash --rcfile ~/....
1
vote
0
answers
27
views
Linux environment variable setting issue in cluster from single point
I have a cluster of few machines. I have to control all configuration from single system. For that I have decided to used .bashrc in Centos 7 servers (I push same .bashrc in each system via rsync from ...
1
vote
0
answers
616
views
Why my profile looks for /usr/local/etc/profile.global (NIS)
My Ubuntu ID is manged by NIS/yellowpage. For some reason, when I log in, I'm getting this message.
cat@local:~$ ssh catserver
cat@catserver's password:
Welcome to Ubuntu 15.10 (GNU/Linux 4.2.0-25-...
0
votes
1
answer
69
views
su command not set BASH_VERSION value and not load profile
I have a Ubuntu 20.04 LTS server version and have a strange problem creating a new user and use it in the shell from a ssh connection. The steps to reproduce it:
Use he root account to create new ...
0
votes
1
answer
738
views
Refresh kerberos ticket instead of prompting for pam password
Using centralised auth against FreeIPA is working great. In order to use Kerberos SSO when using ssh, scp etc from jumphosts users must initiate their Kerberos tickets first with kinit. I've added ...
0
votes
0
answers
81
views
Custom bash prompt failing when home directory is remote
0
I am trying to configure a custom prompt for RHEL 8 users. It works very nice when the users have local home directories.
However, I'm mounting home directories via pam_mount (nfs4). When ssh'ing to ...
0
votes
1
answer
279
views
Exclude or Include certain profile lines during a tmux session start
In my .bash_profile, I have a line to start tmux only if it is present on the system with:
[ -z $TMUX ] && export TERM=xterm-256color && exec tmux
In a similar vein, I would like to ...
0
votes
1
answer
312
views
assigning aliases in .bashrc via echo '...' >> .bashrc
running cat .bashrc gives me these two lines at the end:
alias remove='rm -i'
alias chamber='ls -a -i -l'
when I run
remove
followed by a file name I get a successful removal with confirmation ...
0
votes
2
answers
1k
views
Global use of 'aliases' on Debian 10
I've been trying to add global use of aliases on my Debian 10 instance with no luck.
What I've already attempted is adding my aliases to /etc/bash.bashrc as well as adding this snippet to /etc/profile ...
0
votes
0
answers
82
views
/etc/profile, /etc/bash.basrc, ~/.profile, ~/.bashrc are not read
I am a running "Ubuntu 16.04.6 LTS" Linux.
I've installed/upgrade some packages, but i do not remember exactly which packages.
Since this operation, i have lost ls coloration for all users ...
0
votes
2
answers
273
views
How to export a file to another user's bash while logging in via SSH (using Putty) to RHEL?
I am running RHEL 7.3, however the procedure may be similar on other Linux systems.
I have logged in as root. I have a file called openrc which is full of lines like export OS_IDENTITY_API_VERSION=3....
0
votes
0
answers
318
views
Sudoers, allow user to use root alias
Actually, my root have to aliases:
alias unpool='/path/to/my/scripts/unpool.sh'
alias pool='/path/to/my/scripts/pool.sh'
I have the same for my user in ~/.bashrc
I defined my /etc/sudoers.d/user ...