0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【linuxコマンド】cdコマンドでmacintosh(topディレクトリ)へ移動からvagrant sshの接続まで

Last updated at Posted at 2020-01-11

vagrant sshで仮想マシンへのやり方がいまいち把握していなかったのでまとめます。

topディレクトリへの行き方などを使用した初心者さん向けの内容となります。

topディレクトリまで移動


$ cd /

rooter:/ ユーザ名$ pwd
/

ssh接続する該当ディレクトリまで移動


rooter:/ neko$ ls
Applications	Volumes		etc		sbin
Library		bin		home		tmp
System		cores		opt		usr
Users		dev		private		var

rooter:/ neko$ cd Users


rooter:users neko$ ls
Shared	neko

//ユーザー名を選択
rooter:users neko$ cd neko

rooter:neko neko$ ls
Applications		Music			dump.sql
Desktop			MyVagrant		local.local.pid
Documents		Pictures		mysql.sock
Downloads		Public			sudo
Homestead		Vagrantfile		touch
Library			VirtualBox VMs		過去のlaravel関係
Movies			code

rooter:neko neko$ cd myvagrant

rooter:myvagrant neko$ ls
MyCentOS

rooter:myvagrant neko$ cd mycentos

//virtualbox起動します。
rooter:mycentos neko$ vagrant up

接続完了

$ vagrant ssh
Last login: Sat Jan 11 12:34:17 2020 from 10.0.2.2
[vagrant@localhost ~]$
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?