Closed jameshentai closed 7 years ago
Your home directory (i.e. $HOME). It may not exist if you use a shell without any customizations, in which case you can just create it.
What shell do you use? We don't explicitly list files for every shell in known use, but Bash and zsh aren't the only options.
summaly, .bashrc or .bash_profile?
.bashrc
.
My mistake, the current recommendation is to use .bash_profile
Can you help me this question; http://superuser.com/questions/1116635/how-can-i-complete-the-tutorial-install-linuxbrew-on-linux, that my question
Yes, .bashrc
is a hidden file (and so are .zshrc
, .bash_profile
, etc. - basically any file starting with a period).
That means it won't show up in nautilus
by default. IIRC the default key command to show hidden files in Nautilus is Ctrl-h
.
As for the permissions issue, try chmod +w
on the file you're trying to edit.
Are you trying to do a system-wide installation for the benefit of multiple users, or just for your own personal use? If you're trying to do it for just yourself, you should not need sudo
at all. If you're doing it for the benefit of multiple users, it may make more sense to put the instructions in a system-wide file like /etc/profile
than in $HOME/.bash_profile
.
(EDITED: I thought .bashrc
was the recommended file to use. It's actually .bash_profile
.)
Can you tell me again step by step that part ( my first question ). Add 3 line to .bashrc or .bash_profoile? why in http://linuxbrew.sh/ , it say : echo 'export PATH="$HOME/.linuxbrew/bin:$PATH"' >>~/.bash_profile ,( not .bashrc) !!? Is i edit that 3 line and put "blueberry" into, is i'm right? i actually did it. but it don't work. like you see, http://imgur.com/a/BF2YJ.
My apologies; I'm having difficulty understanding the question is all.
There are some differences between putting the lines into .bashrc
vs. .bash_profile
, but either should work.
Editing the 3 lines to say "/home/blueberry" instead of "$HOME" is perfectly fine, since you've installed Linuxbrew into /home/blueberry/.linuxbrew
. If blueberry
is the username of the user you normally use, then doing this is unnecessary but harmless. If blueberry
is a username that you reserve for administrative use, and you intend to use Linuxbrew from a different user (for example, james
), then changing "$HOME" into "/home/blueberry" is actually necessary.
Are you confused because .bashrc
(or .bash_profile
, etc.) does not exist in /home/blueberry/.linuxbrew
? Assuming you use blueberry
for normal day-to-day use, it should exist at /home/blueberry/.bashrc
, not /home/blueberry/.linuxbrew/.bashrc
.
One other thing: you need to either quit or reload your shell after executing the instructions before you can start installing stuff with brew
. The easiest technique is to just quit your terminal emulator and then start it up again.
I hope you're not getting frustrated. We try our best to make Linuxbrew a comfortable experience for new users, but occasionally that can be kind of difficult.
@jameshentai:
echo
is a shell command. (shell is bash
or zsh
or whatever)echo
command is used to write something to the terminal (so that you can read it).echo 'something' > file
writes something
to file
. If file
exists, this command overwrites itecho 'something' >> file
appends something
to the end of the file
. That is, it does not overwrite it..bashrc
and .bash_profile
are special files used by bash
shell. Like any other .something
file in Linux, these files do not show up by default in programs like nautilus
. Use terminal (konsole
in KDE, terminal
in GNOME) and type ls -a
to see ALL files, including these "hidden" ones..bash_profile
on Linux systems is read only once - when you log in. Variables defined in this file will be "lost" unless you export them using the export
command..bashrc
is read every time you launch terminal/konsole.bluberry
(which is your username). Use just $HOME.Assuming that you installed linuxbrew in your home directory ($HOME
) and used the standard "hidden" folder .linuxbrew
, open a terminal and type (line by line):
(
export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
) >> ~/.bashrc
If you do that, you can start using linuxbrew right away. You CAN use .bash_profile
instead of .bashrc
but remember that in that case you would have to log out (Ctrl + Alt + Backspace
) and log back in for changes to take effect.
I all done till this part: Add to your .:
export PATH="$HOME/.linuxbrew/bin:$PATH" export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH" export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
i can't find file name .bashrc or .zshrc. Do you know where that localed, basiclly?