1
1

More than 1 year has passed since last update.

aptで使うプロキシを設定する

Last updated at Posted at 2021-11-01

非常によく忘れるので、メモ。

確認環境。

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:    20.04
Codename:   focal

$ uname -srvmpio
Linux 5.4.0-89-generic #100-Ubuntu SMP Fri Sep 24 14:50:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

aptのプロキシの設定を行うには、/etc/apt/apt.conf.d配下に以下のような設定ファイルを作成します。

/etc/apt/apt.conf.d/30proxy
Acquire::http::proxy "http://[your-proxy-host]:[your-proxy-port]/";
Acquire::https::proxy "http://[your-proxy-host]:[your-proxy-port]/";

設定ファイル名は、これ以外でもOKです。

dnfの場合は?

こちらへ。

1
1
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
1
1