LoginSignup
2
1

More than 5 years have passed since last update.

ubuntu16.04 備忘録

Last updated at Posted at 2018-04-09

個人メモです。

バージョン確認

$ cat /etc/os-release

リポジトリ更新

$ apt update
$ apt upgrade
$ apt install -y aptitude

ディスク容量の確認

$ df -BM

rootのパスワード設定

$ sudo passwd

ホスト名変更

$ sudo hostnamectl set-hostname ${yourhostname}
$ sudo vi /etc/hosts

locale設定(ja_JP.UTF-8)

$ echo $LANG
en_US.UTF-8
$ sudo apt install language-pack-ja
$ sudo update-locale LANG=ja_JP.UTF-8

時刻設定(Asia/Tokyo)

$ sudo timedatectl set-timezone Asia/Tokyo

sudoグループに追加

# gpasswd -a user_name sudo

エディタ

デフォルトのエディタ変更

vimのダウンロード

$ sudo apt install -y vim

変更

3のBasicを選択。

$ sudo update-alternatives --config editor
alternative editor (/usr/bin/editor を提供) には 4 個の選択肢があります。

  選択肢    パス              優先度  状態
------------------------------------------------------------
* 0            /bin/nano            40        自動モード
  1            /bin/ed             -100       手動モード
  2            /bin/nano            40        手動モード
  3            /usr/bin/vim.basic   30        手動モード
  4            /usr/bin/vim.tiny    10        手動モード

現在の選択 [*] を保持するには <Enter>、さもなければ選択肢の番号のキーを押してください: 3
$

nanoエディタ終了

Ctrl + x

サービスの操作

sshd

$ sudo /etc/init.d/ssh restart

network

$ sudo /etc/init.d/networking restart

ソフトウェアインストール

Ansible

最新バージョンのインストールは公式のガイドを参照

Docker

同様に最新バージョンのインストールは公式のガイドを参照

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