-
Notifications
You must be signed in to change notification settings - Fork 91
Using Basic SSH Commands in Google Cloud's Browser‐Based SSH for VM Instances
PasinduW99 edited this page Oct 10, 2023
·
1 revision
In this guide, we will explore basic SSH commands that can be used in the browser-based SSH terminal for your Google Compute Engine VM instances. SSH (Secure Shell) allows you to remotely access and manage your virtual machines.
Before you begin, make sure you have:
- Created a VM instance in Google Compute Engine as described in a previous guide.
- Open a web browser and navigate to the Google Cloud Console.
- Sign in with your Google Cloud account credentials.
- Locate and select your VM instance from the VM instances list.
- Click the "SSH" button next to your VM instance to open the browser-based SSH terminal.
- To list files and directories in the current directory, simply use the ls command:
- To check disk space usage on your VM, use the df command:
- To check available memory on your VM, use the free -g command:
- To monitor running processes and system resource usage, use the top command:
- To update the package lists for software updates, use the sudo apt update command:
- To upgrade installed packages to their latest versions, use the sudo apt upgrade command:
- To switch to the superuser (root) for administrative tasks, use the sudo su command:
- To add a new user to your system, use the adduser command. Replace newuser with the desired username:
- To exit the SSH session, simply type exit and press Enter.
Using these basic SSH commands in the browser-based SSH terminal for your VM instance allows you to perform various system administration tasks and manage your virtual machine effectively.