31

I am a teacher and have some students on Ubuntu whom I want to give advice to. I want to give them a recommendation on what package manager they should use.

Since I have a Mac computer, I use Homebrew for everything.

  • Does it make sense to use brew on Ubuntu or should I stay with apt-get?
  • What are the main differences because I don't get it 😅
4
  • Why do you want to "provide some advices [sic]"? If your students have questions, they will ask. As a student, I would not have appreciated receiving unsolicited Ubuntu advice from an instructor, especially if they were not familiar with it. -1
    – fkraiem
    Jul 17, 2019 at 11:12
  • 4
    any advice you want to get from askubutu is likely to be "use apt". instructions on AU will all be apt too. I would stay away from 3rd party.
    – Rinzwind
    Jul 17, 2019 at 11:20
  • 1
    @fkraiem Try to install NodeJS, Yarn and React on Windows, MacOS and Linux with updated exercices and you gonna have plenty of weird issues. I just want to have clear instructions and exercices for everyone :) Jul 17, 2019 at 11:45
  • 1
    Good answer in Quora: qr.ae/pylAKD Aug 17, 2023 at 8:18

2 Answers 2

33

I am a user of both macOS and Ubuntu and use both Homebrew (on macOS) and APT (on Ubuntu).

The purpose of both tools is similar. The difference is that APT1 is native, required and fully integrated part of Ubuntu while Homebrew is a 3rd party addition.2 And the most important difference from a user’s perspective is that they use different command syntax, although the tasks are quite similar.

If you are used to Homebrew, you can install it on your Ubuntu. However, if someone is a pure Ubuntu user, I’d absolutely encourage them to use their native tool – APT.

If you’re going to teach using a package system, you should learn the right syntax with the target tool first. It will be a little more work for you at the beginning3 but you can then teach the appropriate tool for the target system. The students should be able to operate the corresponding tool on their computers anyway. For example, if Ubuntu users try to find advice online, they will be definitely directed at APT. APT is also used to upgrade components of the OS.

And if you don’t know how to translate a particular Homebrew command to the APT syntax, don’t hesitate to ask!


1 apt-get is one of its parts and nowadays you can use just the apt command mostly.

2 Homebrew is a 3rd party addition on both macOS and Ubuntu in fact.

3 Not that much if you know the principles of a package manager already.

2
  • 16
    I think using home brew has an advantage of not require the sudo permission.
    – SAMUEL
    Jun 11, 2020 at 14:41
  • 9
    @samuelj90: And being able to install new versions of software on old systems, without running into dependency problems. If you want to install a newer deb on an old system, you'll only find packages requiring libc version N+1. Jul 3, 2020 at 17:59
1

Does it make sense to use brew on Ubuntu or should I stay with apt-get?

Yes. I've recently settled on a Ubuntu / Linuxbrew combo mainly for SW dev and scientific computing (llvm, gcc, numpy, jupyter, ...).

I been using both macOS/Homebrew (10+yrs) and linux/apt (30+yrs, primarily Ubuntu, Debian or Debian-based).

  • More up to date software versions (packages constantly upgraded)
    • Less need to upgrade from stable system version (Ubuntu LTS)
    • Less need to add additional repository sources
  • More system-independent environment (installs in one folder)
    • Change or upgrade system while keeping SW dev environment intact
    • Can be passed as is to containers (podman, docker, ...) or other systems
    • Avoids distro ABI incompatibilities, eg a program/library built with Ubuntu22.04 may not run/link on Ubuntu18.04
  • SW level configurability (packages builds from source)
    • Compile time configurable with extra features if needed
  • Same package interface on both macOs and linux
    • Easier to work on the same project on multiple machines

Remember to install libc in your linuxbrew environment to avoid the binary incompatibilities mentioned above.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .