Can I install a msys .bashrc file on a usb drive? [closed] - windows

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I'm using Git-bash (msys) as my command line tool. I would like to have basic commands like:
export PATH=$PATH:/f/ppython275/App/Scripts
run automatically when I start my shell, but I would like it to be completely self contained, i.e. have the .bashrc file on my usb drive. Is this possible. If so where should I put the .bashrc file

The .bashrc must reside in ~ in order for it to be loaded automatically when you start Git-bash.
There are a couple of options:
Create a symbolic link (using mklink in Windows). This is only supported on NTFS filesystems and I believe it would work across filesystems.
Create a simple .bashrc file in your ~ that sources the file on the USB drive:
source /path/to/USB/based/bashrc

Related

MacOS -bash:Command not found [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
when I try to use the command d2r-server.bat kg_demo_movie_mapping.ttl in the terminal, the command not found.
And I tried to modify the .bash_profile as follow :
it's still not working.
Is there anyway to fix this?
The picture of bat file, and the terminal :
Batch files are for Windows use. In a bash shell you'll need a bash script. Bash scripts can be identified by a shebang line at the top of the script, e.g.:
#!/bin/bash
In the specific case of the d2rq package there are scripts included. Look through the files in your downloaded package and you'll find the bash scripts share the same basename without the .bat extension of the windows batch files.

Why I can`t go to the desktop in terminal (babun) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I cant go to my desktop using cd command.
There is
no such file or directory
error.
What am I doing wrong?
Try using an absolute path like cd /user/home/*YOUR_USERNAME*/Desktop please be advised that Unix bash is case sensitive.
If this don't work you can still run the ls - all command in your home directory to see all folders and files inside.
If you see the "Desktop" folder and just can't change into the directory try using sudo cd ~/Desktop
Hope that helps.

Can I get (the new) bash on Windows 10 to load .profile [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I installed the new subsystem for Linux on Windows 10 (which comes with the Windows anniversary update), and started playing around with it.
What I noticed is that starting the shell (ubuntu bash) does not load .profile or .bash_profile, even though the .profile file exists. Is there a fix?
(And can someone with a lot of reputation make the windows-bash tag?)
By default, this release of Ubuntu-on-windows loads the file named .bashrc.
You can either put the script or add the below line to .bashrc (and create .bashrc if it is non-existent):
. ~/.profile
Note: If .bashrc is sourced from .profile, you may want to comment it out to prevent bash endlessly looping.

Syncing dot files with dropbox [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I puts all my dotfiles in $HOME/Dropbox/dotfiles
and make a hard link(I think it's the way to go, and for instance vim does't load soft link rc file)
ln $HOME/Dropbox/dotfiles/.vimrc $HOME/.vimrc
The problem is as long as I make change to the file in the dropbox directories, everything works as expected. But when I change the hard link file(which is $HOME/.vimrc), the original file changes accordingly, but dropbox won't sync!!(same as iCloud mobile document folder)
Any idea?
Use soft links. Hard links make it so that Dropbox can't tell when the file is updated. This is because Dropbox doesn't poll the contents of every single file you have, it just looks at modification dates on the files located in your Dropbox.
This is exactly what I use for syncing my dot files with Dropbox:
$ ln -s ~/Dropbox/dotfiles/.vimrc .vimrc
and vim still loads the soft-linked vimrc file.

Mac / Unix: overwritten path variable [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I was starting to type the command export PATH=/newPathAddition:$PATH I think I must have copied in a newline when copying the newPathAddition to paste into the command, because it ran export PATH=/newPathAddition. I know I can manually add things to the path variable, but is there any way to restore it to what it used to be, or find out information about which directories were in the path beforehand? I really don't want to be in a situation in the future where all these commands aren't working on my computer because things vanished from the path that I don't remember.
These changes are local to this one command prompt. Just open another terminal window.
If you need the normal value of $PATH to use in this one specific terminal window, open another one and copy its $PATH value.
If you want changes to $PATH to persist, you need to write a .bashrc file or a .profile file in your home folder with the $PATH-altering commands you wish to use. To revert, take them out.

Resources