{"id":4440,"date":"2025-04-17T12:23:39","date_gmt":"2025-04-17T12:23:39","guid":{"rendered":"https:\/\/geekmungus.co.uk\/?p=4440"},"modified":"2025-04-17T12:23:40","modified_gmt":"2025-04-17T12:23:40","slug":"set-bash-and-fancy-colours-on-ec2-instance-when-using-ssm","status":"publish","type":"post","link":"https:\/\/geekmungus.co.uk\/?p=4440","title":{"rendered":"Set BASH and Fancy Colours on EC2 Instance when using SSM"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\" id=\"SetBASHandFancyColoursonEC2InstancewhenusingSSM-BASHPromptviaSSMbyDefault\">BASH Prompt via SSM by Default<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">To set the BASH as the default prompt when using SSM, within the AWS Console browse to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>AWS Systems Manager -> Session Manager -> Prefrences -> Shell Profiles<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Then add the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>exec \/bin\/bash<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then attempt to login via SSM, you should now find you are getting the BASH prompt.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"SetBASHandFancyColoursonEC2InstancewhenusingSSM-FancyColours\">Fancy Colours<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Edit the&nbsp;<strong>.bashrc&nbsp;<\/strong>file within the user home directory and set as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># set a fancy prompt (non-color, unless we know we \"want\" color)\n#xterm-color) color_prompt=yes;;\ncase \"$TERM\" in\n    xterm-color|*-256color) color_prompt=yes;;\nesac<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You should find you now have some fancy colours.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>BASH Prompt via SSM by Default To set the BASH as the default prompt when using SSM, within the AWS Console browse to: Then add the following: Then attempt to login via SSM, you should now find you are getting the BASH prompt. Fancy Colours Edit the&nbsp;.bashrc&nbsp;file within the user home directory and set as &#8230; <a title=\"Set BASH and Fancy Colours on EC2 Instance when using SSM\" class=\"read-more\" href=\"https:\/\/geekmungus.co.uk\/?p=4440\" aria-label=\"Read more about Set BASH and Fancy Colours on EC2 Instance when using SSM\">Read more<\/a><\/p>\n","protected":false},"author":4,"featured_media":4442,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,20],"tags":[],"class_list":["post-4440","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aws","category-random"],"_links":{"self":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/4440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4440"}],"version-history":[{"count":1,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/4440\/revisions"}],"predecessor-version":[{"id":4441,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/4440\/revisions\/4441"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/media\/4442"}],"wp:attachment":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}