LoginSignup
1
8

More than 5 years have passed since last update.

Windows 10 上に Ubuntu 16.04 Desktop 環境を構築する

Posted at

久々に Windows 上で Ubuntu 16.04 desktop を使うことになったので、Vagrant を使って構築しました。手順をメモしておきます。

導入環境

  • Windows 10 Pro build 15063 (Creators Update)
  • Oracle VirtualBox 5.0.36
    • (最新の 5.1.x はなぜか vagrant up が失敗する)
  • Vagrant 1.9.3

Vagrant で Ubuntu を導入する手順

最新の Box を探す

Discover Vagrant Boxes | Atlas by HashiCorp にて、 ubuntu desktop で検索し、最新の Box を探します。

今回は boxcutter/ubuntu1604-desktop を使います。

vagrant init boxcutter/ubuntu1604-desktop
vagrant up --provider virtualbox

VirtualBox に Ubuntu Desktop が立ち上がるので、 ID/PW = vagrant/vagrant でログイン。

Ubuntu の設定

Timezone を Asia/Tokyo に変更

Xterm を起動し、以下を入力します。

timedatectl set-timezone Asia/Tokyo
timedatectl
# "Time zone: Asia/Tokyo (JST, +0900)" に変わっていればOK

日本語関連パッケージのインストール

sudo apt -y install language-pack-ja-base language-pack-ja ibus-mozc fcitx fcitx-mozc
sudo update-locale LANG=ja_JP.UTF-8 LANGUAGE="ja_JP:ja"
source /etc/default/locale
echo $LANG 
# "ja_JP.UTF-8" になれば OK

日本語入力を使えるようにする

  1. Mozc を入力方法として選択可能にする
    1. Unity ランチャーの "System Settings" を起動
    2. "Text Entry" をクリック
    3. "Input sources to use" に以下の2つが表示されているようにする
      • Mozc (Fcitx)
      • English (US)
  2. Fcitx の設定
    1. ランチャーから "Fcitx" を入力し、 "Fcitx 設定" を起動
    2. "Input Method" タブ左下の "+" をクリック
    3. "Mozc" を選択して OK
    4. 同様に "English (US)" も追加
    5. (必要なら) "Global Config" タブで、"入力メソッドのオン/オフ" ショートカットキーを変更する

※設定画面に Fcitx が表示されていない場合、一度ログアウトして再ログインすれば出てくる模様。

(必要なら) Mozc を ATOK 変換方式にする

  1. タスクバーのキーボードアイコンをクリックし、 "Mozcツール > 設定ツール" をクリック
  2. "キー設定の選択" セレクトボックスから "ATOK" を選んで "OK"

(必要なら) キーボード配列を日本語キーボードに変更

/etc/default/keyboard
XKBMODEL="jp106"
XKBLAYOUT="jp"

再起動後に反映されます。

参考

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