LoginSignup
0
0

More than 5 years have passed since last update.

vagrant ifconfigのインストールとPATHの初期設定

Posted at

vagrant ifconfigのインストール

最初にvagrant upした時

terminal
$ vagrant up
$ vagrant ssh

vagrant $ ifconfig
-bash: ifconfig: command not found

ifconfigが入ってない。
ifconfigは/sbin/ifconfigに入っているはず
とりあえず/sbinにパスを通す。

まず、編集するためにvimをインストール

terminal
vagrant $ sudo apt install vim -y

そしてPATHに/sbinを追加
ついでに/usr/sbinと/usr/local/sbinも入れておこう。

terminal
vagrant $ sudo vim .bashrc
~/.bashrc
#一番下に
PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin

まだできない。
そもそものifconfigも入ってなかった。
ifconfigはnet-toolsのパッケージをインストールすれば使えるらしい。

terminal
vagrant $ sudo apt install net-tools

vagrant $ ifconfig

これで使える。

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