DEV Community

Lillie Mae
Lillie Mae

Posted on

HOW TO SSH INTO A LINUX VIRTUAL MACHINE, ENTER THE ROOT ENVIRONMENT, UPDATE IT AND CREATE DIRECTORIES OR FILES IN IT.

Please check previous videos on how to create or deploy a linux virtual machine to get started.

STEP 1
a. Click and open your virtual machine if you have created one. *Here, the name of my already created vm is "Mayworkload"
Image description

STEP 2
a. Click on your public ip address to extend the "idle timeout" from 4 - 30minutes and save it.
Image description
Image description

STEP 3
a. Click on "overview" then click on "Connect"
b. Choose SSH, scroll down and copy no.4
Image description
Image description

STEP 4
a. Open the terminal on your system
b. Paste the ip address you copied in your terminal,(please see diagram below)
Follow this command arrangement to edit it.
ssh username@ipaddress
c. You can also type in the command arrangement in 4b. directly to your terminal, then input your ipaddress seen in no.4 of step 3 in the ipaddress space.
Note* username here refers to the username you gave your administrator account when creating the virtual machine. When creating my vm,the administrator account name was azureuser. Please see the last diagram below to know what it should look like after editing.
d. Hit ENTER key
Image description
Image description
Image description

STEP 5
a. The next space is asking for a password, enter the password you used for the administrator account.
Note* Microsoft azure doesn’t show what you’re typing in when it comes to passwords so just type in your password in to the space.
b. Hit ENTER key and allow it to load.
Image description

STEP 6
a. Type in the command Sudo su
b. Hit ENTER key
Note* Sudo su enables you into the root environment, you can download or update anything only when you’re in the root environment.
Image description

STEP 7
a. Type in command apt update
b. Hit ENTER key and wait for it to load.
Image description

STEP 8
a. Type in a file name already existing in your system that you want to create directory on by using the command mkdir then followed by the file name. E.g i have a folder with the name Grace , my command will be- mkdir Grace
Note* mkdir is used to create directory or subdirectories or other files, while directory is a place where you keep folders.
Image description

STEP 9
a. Type in the command ls to list a directory or the contents of a directory.
Note* ls (list of files or subdirectories) as a command is used to list the content of a directory or file.
Image description
b. You can go on to add more files as much as you want and also list them.

!!!!

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay