Giter VIP home page Giter VIP logo

Comments (8)

rwhogg avatar rwhogg commented on June 19, 2024

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.

from legacy-linuxbrew.

jameshentai avatar jameshentai commented on June 19, 2024

summaly, .bashrc or .bash_profile?

from legacy-linuxbrew.

rwhogg avatar rwhogg commented on June 19, 2024

.bashrc.

My mistake, the current recommendation is to use .bash_profile

from legacy-linuxbrew.

jameshentai avatar jameshentai commented on June 19, 2024

Can you help me this question; http://superuser.com/questions/1116635/how-can-i-complete-the-tutorial-install-linuxbrew-on-linux, that my question

from legacy-linuxbrew.

rwhogg avatar rwhogg commented on June 19, 2024

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.)

from legacy-linuxbrew.

jameshentai avatar jameshentai commented on June 19, 2024

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.

from legacy-linuxbrew.

rwhogg avatar rwhogg commented on June 19, 2024

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.

from legacy-linuxbrew.

maxim-belkin avatar maxim-belkin commented on June 19, 2024

@jameshentai:

  1. echo is a shell command. (shell is bash or zsh or whatever)
  2. echo command is used to write something to the terminal (so that you can read it).
  3. echo 'something' > file writes something to file. If file exists, this command overwrites it
  4. echo 'something' >> file appends something to the end of the file. That is, it does not overwrite it.
  5. .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.
  6. .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.
  7. .bashrc is read every time you launch terminal/konsole.
  8. $HOME is an environment variable that is equal to /home/$USER
  9. $USER is your username. Hence, no need to write 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.

from legacy-linuxbrew.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.