HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

vagrant port — List mappings between guest and host ports. See also: `vagrant`. More information: <https://develope

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandbetweenandvagrant portclimappingslistguest

Problem

How to use the vagrant port command: List mappings between guest and host ports. See also: vagrant. More information: <https://developer.hashicorp.com/vagrant/docs/cli/port>.

Solution

vagrant port — List mappings between guest and host ports. See also: vagrant. More information: <https://developer.hashicorp.com/vagrant/docs/cli/port>.

List all port mappings of machine(s) running in the current directory:
vagrant port


List mappings for a specific machine (if Vagrantfile is multi-machine):
vagrant port {{machine_name}}


Display info for a specific guest port:
vagrant port --guest {{port_number}}


Display machine-readable output:
vagrant port --machine-readable

Code Snippets

List all port mappings of machine(s) running in the current directory

vagrant port

List mappings for a specific machine (if `Vagrantfile` is multi-machine)

vagrant port {{machine_name}}

Display info for a specific guest port

vagrant port --guest {{port_number}}

Display machine-readable output

vagrant port --machine-readable

Context

tldr-pages: common/vagrant port

Revisions (0)

No revisions yet.