Tag Info

New answers tagged

0

As people have already stated, you can find a skeleton of bashrc in /etc/skel/.bashrc. If different users want different bash configurations then you must put a .bashrc file in that users home folder. When it comes to .bash_profile and .bash_login, the user needs to create those manually and link them via bashrc. bash_profile and bash_login exist to create ...


0

You can try any of the following set alias typeset -f or if you are using Bash 4 look at the builtin compgen


-1

Add in ~/.bashrc export PS1='\[\e[31;1m\]\h\w # \[\e[0m\]'


1

The reason it didn't work with $JAVA_HOME is that $JAVA_HOME isn't the same thing as $JAVA_HOME/bin. Your binaries (java, javac, javaws, etc) are all found in the bin directory inside your $JAVA_HOME, not in the $JAVA_HOME itself. The working line in your question points towards /usr/java/jre1.8.0_51/bin; the JAVA_HOME variable points towards ...


1

So, finally I got the answer to your problem. Your ECHO environment variable consists of /usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/local/bin:/opt/aws/bin:/root/bin. But, it doesn't contain /usr/bin. When I do which yum OR which sudo in my CentOS, the output I get is that these executables are located in /usr/bin. So, the only way I think it'd work is ...


0

Wrap your colour escape sequences in \[ and \] (like mentioned in the answer to the question you linked to) to mark them as non-printable characters. That way, bash won't count them towards the prompt length when calculating after how many characters it should move to a new line. STARTCOLOR='\e[0;36m' ENDCOLOR="\e[0m" export PS1="\n\[$STARTCOLOR\]\u@\h:\! ...


1

In cygwin you access drive letters by going through /cygdrive eg: sh /cygdrive/d/dev/Main/Env/tpsScripts/devenv.sh



Top 50 recent answers are included