MacBook Pro


Jump to: navigation, search



  • How to know the operating system?

  • Create a Mac App Store account without credit card

  • Make a screen capture
cmd + shift + 3

Notes: all the shortcuts are available in Préférences Système in Keyboard (Clavier)

  • Go directly to the desktop (expose)
fn + F11

(you can change in System Preferences --> Mission Control)


The configuration is done through the Préférences Système menu.



Xcode is the developer package of Apple. It allows one to install developer tools, essentially using the shell.

To install Xcode:

  1. Create an Apple Developer ID
  2. Use the application "App Store" (free and normally installed by default on the system)

More info about the changes in Xcode:

Since the 4.3 version, it will be a simple application placed in your /Applications folder.

Besides, Apple also distributes a Command-Line Tools for Xcode, which you can download here: Command-Line tools for Xcode. Those tools can also be installed by starting Xcode and using the Downloads preference panes.

Package managers

As on Linux, you have what we can call package managers and which are a very convenient way to download, configure, making, installing, and keeping up-to-date packages automatically.
The most common ones are:

Xcode is necessary in order to install these.

Although very convenient, they will install their packages in distinct folders by default, ex:

  • /opt for Macports,
  • /sw for Fink
  • ...

and if you are to compile programs in which you have to specify the compiler and library paths, be sure not to mix up all paths between your apple tools (typically installed in /usr/bin or /usr/lib...) and the packages installed via the package manager, and even your maybe self-installed packages (typically installed /usr/local)! This in order to avoid compatibility issues between the compiler and the libraries versions.

For example in order to use MacPorts tools, you'll have to set up correctly your PATH variable (see for MacPorts for example: Important steps when installing MacPorts). Look also below for more information about setting up your PATH variable.

Remember you can also use the which command in order to see where your system will fetch the command require.


MacBook-Pro-de-GHER:~ gherulg$ which gcc

MacBook-Pro-de-GHER:~ gherulg$ which gfortran

Setting up the PATH variable

To add permanently custom paths to your PATH environment variable:

  • edit the file /etc/paths or
  • add any text file (with any name) containing your paths line-by-line in the /etc/paths.d folder

The first paths to be cited will be the first ones to be searched.

You can also use the $HOME/.bash_profile (or .bash_rc) with an export PATH command, which will be executed every time you open a shell session.

For instance, for MacPorts:

export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export DISPLAY=:0.0


Apple's Mac OS X is based on the Darwin operating system, released by Apple in 2000 and, to cite Wikipédia, "it is composed of code developed by Apple, as well as code derived from NeXTSTEP, BSD, and other free software projects".

The license is APSL, the Apple Public Source License, that meets the requirements of the Free Software foundation (FSF) since 2003. However, the tools you will use are not likely to be exactly the same as the ones used on the Linux System, with a GNU License.

Quick examples:

  • tail -v, which is the verbose mode in which tail also prints a header with filename
  • execute command with sed.

The GNU tools can be installed, either manually (via websites [1] and [2]) or using a package manager. For example with macports you will need to install coreutils and findutils using

$ sudo port install coreutils findutils

Once installed, those tools are prefixed with the letter "g" to distinguish them from the BSD tools. For example : cp <-> gcp, ls <-> gls... If you want to use them by default, you can add this path to your PATH variable: /opt/local/libexec/gnubin/.

Configuration of SSH

Need to create the command ssh-copy-id in /usr/bin for instance. The script can be found on the internet, e.g.,

Then you can follow the instructions from

Useful software to install


sudo port install py26-wxpython py26-numpy py26-matplotlib
sudo port install py26-scipy py26-ipython

where py26 has to be adapted according to your installation.


sudo port install  py-matplotlib-basemap


  • Python Imaging Library (PIL)
sudo easy_install pip
sudo pip install virtualenv
sudo pip install PIL





  • Mactex:

  • TexMaker (editor)

  • Missing packages: download the packages you need from CTAN, and place them in ~/Library/texmf/tex/latex/. You may have to create this directory.

  • I also had to type

in the preambule to avoid error

No room for a new ‘thing’


$ sudo port install ImageMagick

if you're using macports.


Personal tools