Reputation: 133
I am new to computers and using the terminal. Most tutorials I look at for downloading tell me to go to usr/local/src. However, I don't find this on mac. Should I just make a directory called src?
Or is this something specific only to linux users?
If someone could tell me how much difference it makes for this directory to exist or not that would be great. Can I complete my installations in usr/local itself?
Thanks
Upvotes: 12
Views: 42663
Reputation: 3155
Using the Finder, you can press Cmd-Shift-G and type /usr
to display that folder. The /local
folder is there by default, but not its /src
subfolder. The Finder, of course, can easily create it for you.
As @cricket_007 mentioned, you need to be certain of what you're doing in this area of the system — that's why OS X doesn't display those folders by default. If you understand the risk and want to see everything in the Finder, you can issue the following Terminal command:
defaults write com.apple.finder AppleShowAllFiles YES
... then type:
killall Finder
and it will look like this. The hidden folders have a slightly faded appearance, but you can navigate into them as desired:
You may simply use the key combination: " Cmd Shift > " to toggle on and off hidden file display.
Upvotes: 21
Reputation: 122421
It depends what you are doing. If you're messing about just create one in your home directory:
$ cd ~
$ mkdir src
If you building stuff via configure
etc., and you want to install it into /usr/local
(the default install prefix), then just do this:
$ cd ~/src/packagename
$ ./configure ... options ...
$ make
$ sudo make install
Upvotes: 0