Everyday usage of Homestead
There are various commands that you can use to interact with your Homestead
virtual machine. For example, if the virtual machine is running, how do you stop it?
There are two ways.
The first method is with the
$ homestead suspend
command. This will save the
current state of your VM, and allow you to
$ homestead resume
at a later point
in time. Alternatively, you can issue the
$ homestead halt
command, which will
shut down the virtual machine and discard anything in memory. You can think of
the differences as either putting the virtual machine to sleep, or completely shutting
it down. To bring a halted VM back, you can simply run the
$ homestead up
command again.
You can also interact and run commands on the virtual machine via the command
line. You can SSH into Homestead just like you would an external server. Instead of
having to remember the virtual machine's host name and your credentials though,
there's a handy
$ homestead ssh
command that will connect to the machine and
then place you in a command prompt ready and waiting. If you are using Windows,
there are various tools to execute SSH commands, such as PuTTY.
Do'stlaringiz bilan baham: |