LoginSignup
0
0

apt と apt-get、結局どちらを使えばいいのか?

Posted at

経緯

私の理解だと、aptapt-getの上位互換という認識であった。
そのため、ほぼapt-getは使わず、aptのみを使ってきた。

では、なぜapt-getを使い続ける人がいるのだろう?

結論

どちらを使ってもいい。
ただし、状況により使い分けるのがベター

  • apt
    • apt-getをベースに視覚効果などを強化。リッチになっている。
  • apt-get
    • 必要最小限。

つまり、通常の使用(ターミナル上での使用)では、「aptを使う」で問題はない。
だが、シェルスクリプト上で使うのであれば、メモリ消費が少ないapt-getを使うべき。

確かに...

シェルスクリプト・Dockerfileでは、apt-getを目にする機会が多いような気がする。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0