Engineer's Notebook

あるエンジニアの雑多メモ 技術的なことや資産運用などを技術者目線で綴ります

Bash on Ubuntu on Windowsのapt-get(apt)を高速化する

投稿日:2016-10-20 更新日:

Bash on Ubuntu on WindowsはUbuntu同様apt-getコマンドでアプリをインストールできます。

ただ、若干遅い。原因はAPTのリポジトリが海外のものになってるからです。

これを日本のリポジトリに変更することで若干高速化できます。

 

スポンサーリンク

日本の利いポジ取りを参照する手順

APTのリポジトリリストは /etc/apt/sources.list にあります。このファイル中のURLのarchive.ubuntu.com,security.ubuntu.comjp.archive.ubuntu.comに変更します。

例えばこんな感じ。

<変更前>
deb http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu trusty-security main restricted universe multiverse

<変更後>
deb http://jp.archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
deb http://jp.archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
deb http://jp.archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
deb http://jp.archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse

変更が終わったら
$ sudo apt-get update
を実行してローカルのパッケージリストを更新しておきます。

これで日本のリポジトリが参照されます。

アドセンス 336x280

アドセンス 336x280

関連コンテンツ

いまあなたにおすすめ

-Linux on Windows

Copyright© Engineer's Notebook , 2022 All Rights Reserved Powered by AFFINGER5.