• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Search

Capture GCP VM Serial Port Output to Terminal

August 28, 2023

Here’s the command to capture a GCP VM serial port output to your terminal.

gcloud compute instances get-serial-port-output servername \
--zone us-central1-f \
--project your-project \
--port 1

gcloud compute instances get-serial-port-output servername \ --zone us-central1-f \ --project your-project \ --port 1

You can also send the output to a file.

gcloud compute instances get-serial-port-output servername \
--zone us-central1-f \
--project your-project \
--port 1 > output.txt

gcloud compute instances get-serial-port-output servername \ --zone us-central1-f \ --project your-project \ --port 1 > output.txt

Filed Under: Cloud, Linux Tagged With: file, gcp, output, send, serial port, terminal

  • Home
  • About
  • Search

Copyright © 2023