{"id":475,"date":"2021-04-19T19:54:28","date_gmt":"2021-04-19T19:54:28","guid":{"rendered":"https:\/\/thecloudwiki.com\/?p=475"},"modified":"2021-06-20T15:42:39","modified_gmt":"2021-06-20T15:42:39","slug":"azure-basics-run-shell-script-or-command-on-a-linux-vm-without-login-to-vm","status":"publish","type":"post","link":"https:\/\/thecloudwiki.com\/?p=475","title":{"rendered":"Azure Basics &#8211; Run shell script or command on a Linux VM without login to VM"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">There are times we can&#8217;t log in to the VM due to several reasons. Azure provided a way to run commands on the VM without login in using SSH.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">From the run command section, we can run a shell script and Ipconfig information of that VM<br>If we need to find disk info, just go to the<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>run shell script <\/strong>section <\/li><li>and in the <strong>Linux shell script box<\/strong><\/li><li>Enter &#8211;&gt; <strong>df -h<\/strong><\/li><li>Click on <strong>run<\/strong><\/li><li>output will be displayed below<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Below screenshot provides an understanding on how to use run command<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"489\" src=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/01-1024x489.png\" alt=\"\" class=\"wp-image-476\" srcset=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/01-1024x489.png 1024w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/01-300x143.png 300w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/01-768x367.png 768w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/01.png 1328w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"865\" src=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/02-1-1024x865.png\" alt=\"\" class=\"wp-image-477\" srcset=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/02-1-1024x865.png 1024w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/02-1-300x253.png 300w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/02-1-768x649.png 768w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/02-1.png 1127w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"777\" src=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/03-1024x777.png\" alt=\"\" class=\"wp-image-478\" srcset=\"https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/03-1024x777.png 1024w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/03-300x228.png 300w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/03-768x583.png 768w, https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/04\/03.png 1092w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>To get IP details of the VM<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are times we can&#8217;t log in to the VM [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1355,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[22],"tags":[14],"class_list":["post-475","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","tag-azure"],"uagb_featured_image_src":{"full":["https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/05\/Azure-runscriptwithotlogin-feature-image-e1624203593820.png",400,267,false],"thumbnail":["https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/05\/Azure-runscriptwithotlogin-feature-image-150x150.png",150,150,true],"medium":["https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/05\/Azure-runscriptwithotlogin-feature-image-300x200.png",300,200,true],"medium_large":["https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/05\/Azure-runscriptwithotlogin-feature-image-e1624203593820.png",400,267,false],"large":["https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/05\/Azure-runscriptwithotlogin-feature-image-e1624203593820.png",400,267,false],"1536x1536":["https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/05\/Azure-runscriptwithotlogin-feature-image-e1624203593820.png",400,267,false],"2048x2048":["https:\/\/thecloudwiki.com\/wp-content\/uploads\/2021\/05\/Azure-runscriptwithotlogin-feature-image-e1624203593820.png",400,267,false]},"uagb_author_info":{"display_name":"Sandeep","author_link":"https:\/\/thecloudwiki.com\/?author=1"},"uagb_comment_info":0,"uagb_excerpt":"There are times we can&#8217;t log in to the VM [&hellip;]","_links":{"self":[{"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=\/wp\/v2\/posts\/475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=475"}],"version-history":[{"count":2,"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=\/wp\/v2\/posts\/475\/revisions"}],"predecessor-version":[{"id":1363,"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=\/wp\/v2\/posts\/475\/revisions\/1363"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=\/wp\/v2\/media\/1355"}],"wp:attachment":[{"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thecloudwiki.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}