Tag Info

New answers tagged

0

This is neither a bad design decision, nor a bug, nor an expected behavior of shells and terminals It is merely an unfortunate default value of a per-profile configuration option in Gnome Terminal, which you can easily fix. Go to Edit -> Profile Preferences. Select the Title and Command tab. Notice how the Run command as login shell checkbox is ...


2

Is asking if you want to add Anaconda to your PATH. This basically means that when you type anaconda at the command line interface it knows where to look for it. Just suggesting you do what 1. recommended or perform the following command so you are able to run anaconda from the command line without first having to go to /opt/anaconda/anaconda.bin (this is ...


0

See https://www.gnu.org/software/bash/manual/bashref.html#Bash-Startup-Files When Bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, ...


0

In Ubuntu bash login works the same as in other Distros. Once you add the alias in your .bashrc like you did using: alias ls='ls --color=always -ragX' To have ls running automatically every time you log in you can simply add it to the last line of your .bashrc file. If you do not see the output of ls or ls --color=always -ragX at login there is probably ...


0

As muru did already say there should per default (after first login) be a .bashrc in your home directory /home/youloginname To protect your existing bashrc please create a copy with the following command. cp ~/.bashrc ~/mybashrc.backup After this you can restore the default .bashrc , to do this remove first the existing one and then copy it over from the ...


0

A few things to note: .bashrc files don't "run", so if you look in a list of processes, you won't see it anywhere, and that's fine. bash reads the bashrc file when it starts up, so if you make changes to your bashrc file, they won't take effect until the next time you run bash. When you're testing edits to your bashrc file, you can easily see the changes ...


0

I agree with @sylvain-pineau that it should be located in .bashrc. Im using a git-prompt shell script that I've forked on github. It works very well with git, svn and hg. It shows you which branch you are in, which files you have that is new, which files that is changed (in different colors) and the status from your last bash command. You can download it ...


1

According to the following HOWTO, your .bashrc is actually the best place to tweak $PS1: the PS1 string should be set in .bashrc. this is because non-interactive bashes go out of their way to unset PS1. the bash man page tells how the presence or absence of PS1 is a good way of knowing whether one is in an interactive vs non-interactive (ie script) ...


1

Likely what happened is you concatenated two separate echo commands on a single line, causing the second command (complete with the echo) to get written to the file (instead of the output of the command). Open your ~/.bashrc file in any text editor, and replace the line echo export PATH by plain export PATH It's a list of directories that are searched (in ...


3

If this works: ls | grep -i 'book_i_want' Then, so will this gnome-open *book_i_want* To make it case insensitive: shopt -s nocaseglob gnome-open *book_i_want* In fact, both of the above will work better than using ls since they can deal with any file name, including those with whitespace and strange characters, which ls can't.


5

To answer the initial question, you would pipe through xargs if you wanted to launch something with STDIN as an argument. ls | ... | xargs gnome-open Or you could treat the output like an argument directly. This is less useful in very long directories as you might hit the argument limit. xargs is almost certainly faster. gnome-open $(ls | ...) But you ...


1

Add this line to your ~/.bash_aliases: alias opn='gnome-open'


6

To find which file defines JAVA_HOME, run: PS4='+ $BASH_SOURCE:$LINENO:' BASH_XTRACEFD=7 bash -xlic "" 7>trace.out This generate debug output for a bash login shell and saves it to the file trace.out. There will be many lines in that file. The lines look like: + /etc/profile:7:PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + ...



Top 50 recent answers are included