質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
CentOS

CentOSは、主にRed Hat Enterprise Linux(RHEL)をベースにした、フリーのソフトウェアオペレーティングシステムです。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

Q&A

解決済

1回答

1008閲覧

MACのターミナルでで$touch /vagrant/data/testと打つとそのようなファイルやディレクトリはないと言われます

L-sunsui

総合スコア45

CentOS

CentOSは、主にRed Hat Enterprise Linux(RHEL)をベースにした、フリーのソフトウェアオペレーティングシステムです。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

0グッド

0クリップ

投稿2019/08/21 03:48

(base) MacBookPro yokoyamanaonori ~/centos7 $ vagrant relord Usage: vagrant [options] <command> [<args>] -v, --version Print the version and exit. -h, --help Print this help. Common commands: box manages boxes: installation, removal, etc. cloud manages everything related to Vagrant Cloud destroy stops and deletes all traces of the vagrant machine global-status outputs status Vagrant environments for this user halt stops the vagrant machine help shows the help for a subcommand init initializes a new Vagrant environment by creating a Vagrantfile login package packages a running vagrant environment into a box plugin manages plugins: install, uninstall, update, etc. port displays information about guest port mappings powershell connects to machine via powershell remoting provision provisions the vagrant machine push deploys code in this environment to a configured destination rdp connects to machine via RDP reload restarts vagrant machine, loads new Vagrantfile configuration resume resume a suspended vagrant machine snapshot manages snapshots: saving, restoring, etc. ssh connects to machine via SSH ssh-config outputs OpenSSH valid configuration to connect to the machine status outputs status of the vagrant machine suspend suspends the machine up starts and provisions the vagrant environment upload upload to machine via communicator validate validates the Vagrantfile vbguest plugin: vagrant-vbguest: install VirtualBox Guest Additions to the machine version prints current and latest Vagrant version winrm executes commands on a machine via WinRM winrm-config outputs WinRM configuration to connect to the machine For help on any individual command run `vagrant COMMAND -h` Additional subcommands are available, but are either more advanced or not commonly used. To see all subcommands, run the command `vagrant list-commands`. (base) MacBookPro yokoyamanaonori ~/centos7 $ vagrant ssh Last login: Wed Aug 21 03:06:09 2019 from 10.0.2.2 [vagrant@localhost ~]$ touch /vagrant/data/test touch: `/vagrant/data/test' に touch できません: そのようなファイルやディレクトリはありません [vagrant@localhost ~]$

https://wemo.tech/1590

vagrant上のcentosとの共有フォルダをつくりたいのですがうまくできません。

MACのターミナルでで$touch /vagrant/data/testと打つとそのようなファイルやディレクトリはないと言われます。

なぜ$touch /vagrant/data/testと打ちMac側の共有フォルダ(「~/centos7/data」)をFinderで確認できないのかわかりません。書く方が違うのでしょうか?

有識者の方にご教授いただければ幸いです。よろしくお願い申し上げます。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

/vagrant/data/test
というディレクトリはあるんですか?
もいちど確認してみよう

投稿2019/08/21 03:57

y_waiwai

総合スコア87719

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

L-sunsui

2019/08/21 04:41

macbookproデスクトップの右上のHDDの名前の中にユーザーとゆうディレクトリがあり、 その中に家のマークのyokoyamanaonori(多分HOMEディレクトリがあります。)その中に centos7とゆうディレクトリはありますが、/vagrant/data/testとゆうディレクトリは Homeの中にvagrantとゆうディレクトリがないといけないとゆうことでしょうか? それとも先ほど登場したHOMEディレクトリの中にcentos7とゆうディレクトリがないといけないとゆうことでしょうか?それとも.vagrant.dの中の話でしょうか?お忙しいと思いますが、ご教授願いいたします。
y_waiwai

2019/08/21 04:54

vagrantの中の話ですね。 共有の話は情報が書かれてないのでなんとも言えませんが、 「vagrant 共有フォルダ」でぐぐれば設定法の記事がたくさんでてきますぜ
L-sunsui

2019/08/21 05:10

了解です。どうもありがとうございます。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問