{"id":17018,"date":"2023-08-21T06:40:51","date_gmt":"2023-08-21T06:40:51","guid":{"rendered":"https:\/\/linuxsimply.com\/?p=17018"},"modified":"2023-12-31T07:42:27","modified_gmt":"2023-12-31T07:42:27","slug":"bash-ps1","status":"publish","type":"post","link":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/","title":{"rendered":"What is PS1 Variable in Bash? [3 Customization Examples]"},"content":{"rendered":"<p style=\"text-align: justify;\">In Bash, the <strong>PS1 variable<\/strong> plays a pivotal role in shaping and enhancing the command line experience. This is such a powerful variable that helps to customize the format and appearance of the primary Bash prompt. In this article, you will find detailed ideas about the <strong>Bash PS1 variable<\/strong> regarding its specialty, customization format, etc. So, let\u2019s explore!<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#What_is_PS1_Variable_in_Bash\" >What is PS1 Variable in Bash?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#Some_Backslash-escape_Characters_Used_in_PS1_Bash_Variable\" >Some Backslash-escape Characters Used in PS1 Bash Variable<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#How_to_Check_the_Default_Value_of_Bash_PS1_Variable\" >How to Check the Default Value of Bash PS1 Variable?<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#3_Customization_Examples_of_Bash_PS1_Variable\" >3 Customization Examples of Bash PS1 Variable<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#1_Display_the_Date_and_Time_in_the_Bash_Prompt\" >1. Display the Date and Time in the Bash Prompt<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#2_Change_the_Background_and_Foreground_Color_of_Bash_Prompt\" >2. Change the Background and Foreground Color of Bash Prompt<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#3_Display_Emoji_in_the_Bash_Prompt\" >3. Display Emoji in the Bash Prompt<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#Whats_So_Special_About_Bash_PS1_Variable\" >What\u2019s So Special About Bash PS1 Variable?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#How_to_Customize_the_PS1_Values_Permanently_in_Bash_Command_Prompt\" >How to Customize the PS1 Values Permanently in Bash Command Prompt<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#Conclusion\" >Conclusion<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#People_Also_Ask\" >People Also Ask<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#What_do_you_mean_by_escape_sequences_in_the_PS1_variable_in_Bash\" >What do you mean by escape sequences in the PS1 variable in Bash?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#How_to_make_my_custom_PS1_persistent\" >How to make my custom PS1 persistent?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#Does_PS1_support_variables_and_command_substitution\" >Does PS1 support variables and command substitution?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#How_to_reset_the_prompts_text_and_color_formatting\" >How to reset the prompt\u2019s text and color formatting?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#Are_there_any_variables_related_to_prompt_except_PS1\" >Are there any variables related to prompt except PS1?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#Is_it_possible_to_share_the_custom_prompt_configurations\" >Is it possible to share the custom prompt configurations?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"What_is_PS1_Variable_in_Bash\"><\/span>What is PS1 Variable in Bash?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\"><strong>PS1 variable<\/strong> is a type of environment variable that defines the generation and customization of the content of the primary prompt that appears while interacting with the Bash shell. Actually, <strong>PS1 <\/strong>stands for <strong>Prompt String 1<\/strong>. It specifies how the prompt appears before you type a new command in your terminal. Moreover, you can modify this PS1 variable and customize the prompt\u2019s appearance.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Some_Backslash-escape_Characters_Used_in_PS1_Bash_Variable\"><\/span>Some Backslash-escape Characters Used in PS1 Bash Variable<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">In Bash, the <strong>backslash-escape sequences<\/strong> are used to represent the special behavior of specific characters. And you can use these backslash-escape characters to customize the PS1 Bash variable. Here are some commonly used backslash-escape characters used in PS1 variable in Bash:<\/p>\n<p><span style=\"font-weight: 400;\"><div class=\"su-table su-table-responsive su-table-alternate su-table-fixed\"><\/span><\/p>\n<table style=\"width: 100%;height: 416px\" width=\"100%\">\n<tbody>\n<tr style=\"height: 26px\">\n<th style=\"width: 22.9091%;text-align: center;vertical-align: middle;height: 26px\" width=\"168\"><strong>Backslash-escaped Character<\/strong><\/th>\n<th style=\"width: 76.1212%;text-align: center;vertical-align: middle;height: 26px\" width=\"432\"><strong>Description<\/strong><\/th>\n<\/tr>\n<tr style=\"height: 26px\">\n<td style=\"width: 22.9091%;height: 26px;text-align: center\" width=\"168\"><strong>\\u<\/strong><\/td>\n<td style=\"width: 76.1212%;height: 26px\" width=\"432\">It displays the current username.<\/td>\n<\/tr>\n<tr style=\"height: 26px\">\n<td style=\"width: 22.9091%;height: 26px;text-align: center\" width=\"168\"><strong>\\h<\/strong><\/td>\n<td style=\"width: 76.1212%;height: 26px\" width=\"432\">It represents the short hostname of the system.<\/td>\n<\/tr>\n<tr style=\"height: 26px\">\n<td style=\"width: 22.9091%;height: 26px;text-align: center\" width=\"168\"><strong>\\H<\/strong><\/td>\n<td style=\"width: 76.1212%;height: 26px\" width=\"432\">It represents the full hostname of the system including the domain.<\/td>\n<\/tr>\n<tr style=\"height: 26px\">\n<td style=\"width: 22.9091%;height: 26px;text-align: center\" width=\"168\"><strong>\\d<\/strong><\/td>\n<td style=\"width: 76.1212%;height: 26px\" width=\"432\">It represents the current date format like <strong>Day Month Date<\/strong>.<\/td>\n<\/tr>\n<tr style=\"height: 26px\">\n<td style=\"width: 22.9091%;height: 26px;text-align: center\" width=\"168\"><strong>\\w<\/strong><\/td>\n<td style=\"width: 76.1212%;height: 26px\" width=\"432\">It displays the full path of the current working directory.<\/td>\n<\/tr>\n<tr style=\"height: 26px\">\n<td style=\"width: 22.9091%;height: 26px;text-align: center\" width=\"168\"><strong>\\W<\/strong><\/td>\n<td style=\"width: 76.1212%;height: 26px\" width=\"432\">It displays the last part of the current working directory.<\/td>\n<\/tr>\n<tr style=\"height: 26px\">\n<td style=\"width: 22.9091%;vertical-align: middle;height: 26px;text-align: center\" width=\"168\"><strong>\\t<\/strong><\/td>\n<td style=\"width: 76.1212%;height: 26px\" width=\"432\">It represents the current time in <strong>24-hour<\/strong> format (<strong>Hour:Minute:Second<\/strong>).<\/td>\n<\/tr>\n<tr style=\"height: 52px\">\n<td style=\"width: 22.9091%;vertical-align: middle;height: 52px;text-align: center\" width=\"168\"><strong>\\T<\/strong><\/td>\n<td style=\"width: 76.1212%;height: 52px\" width=\"432\">It represents the current time in a <strong>12-hour<\/strong> format with AM\/PM (<strong>Hour:Minute:Second AM\/PM<\/strong>).<\/td>\n<\/tr>\n<tr style=\"height: 52px\">\n<td style=\"width: 22.9091%;vertical-align: middle;height: 52px;text-align: center\" width=\"168\"><strong>\\@<\/strong><\/td>\n<td style=\"width: 76.1212%;height: 52px\" width=\"432\">It represents the current time in a <strong>12-hour<\/strong> format with AM\/PM (<strong>Hour:Minute AM\/PM<\/strong>).<\/td>\n<\/tr>\n<tr style=\"height: 26px\">\n<td style=\"width: 22.9091%;vertical-align: middle;height: 26px;text-align: center\" width=\"168\"><strong>\\e<\/strong><\/td>\n<td style=\"width: 76.1212%;height: 26px\" width=\"432\">It represents the ASCII escape character used to control &amp; format sequences.<\/td>\n<\/tr>\n<tr style=\"height: 26px\">\n<td style=\"width: 22.9091%;height: 26px;text-align: center\" width=\"168\"><strong>\\n<\/strong><\/td>\n<td style=\"width: 76.1212%;height: 26px\" width=\"432\">It specifies a newline character.<\/td>\n<\/tr>\n<tr style=\"height: 26px\">\n<td style=\"width: 22.9091%;height: 26px;text-align: center\" width=\"168\"><strong>\\v<\/strong><\/td>\n<td style=\"width: 76.1212%;height: 26px\" width=\"432\">It displays only the release version of the Bash.<\/td>\n<\/tr>\n<tr style=\"height: 26px\">\n<td style=\"width: 22.9091%;height: 26px;text-align: center\" width=\"168\"><strong>\\V<\/strong><\/td>\n<td style=\"width: 76.1212%;height: 26px\" width=\"432\">It displays the release version &amp; patch level of the Bash.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3><span class=\"ez-toc-section\" id=\"How_to_Check_the_Default_Value_of_Bash_PS1_Variable\"><\/span>How to Check the Default Value of Bash PS1 Variable?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">You can simply open your <strong>Ubuntu <\/strong>terminal, run the <strong><a href=\"https:\/\/linuxsimply.com\/echo-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">echo<\/a> <\/strong>command and check the default value of the <strong>PS1 variable<\/strong> in Bash. Basically, for the Ubuntu-based system, the default value of <strong>PS1 <\/strong>includes <strong>three <\/strong>information:<\/p>\n<ol style=\"list-style-type: lower-roman;\">\n<li>Username (\\u),<\/li>\n<li>Hostname (\\h),<\/li>\n<li>Full path of the current working directory (\\w).<\/li>\n<\/ol>\n<pre><code class=\"language-bash\" data-line=\"\">echo PS1<\/code><\/pre>\n<div class=\"su-box su-box-style-default\" id=\"\" style=\"border-color:#aeb0b3;border-radius:0px;max-width:none\"><div class=\"su-box-title\" style=\"background-color:#E1E3E6;color:#000000;border-top-left-radius:0px;border-top-right-radius:0px\"> EXPLANATION<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:0px;border-bottom-right-radius:0px\">\n<ul>\n<li><strong>echo PS1<\/strong>: It displays the default value of the <strong>PS1 variable<\/strong>.<\/li>\n<\/ul>\n<\/div><\/div>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-17077\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img1-Checking-the-default-values-of-PS1.png\" alt=\"Checking the default values of PS1\" width=\"825\" height=\"168\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img1-Checking-the-default-values-of-PS1.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img1-Checking-the-default-values-of-PS1-300x61.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img1-Checking-the-default-values-of-PS1-766x156.png 766w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<p style=\"text-align: justify;\">From the image, you can see the default value of the PS1 variable and the format of the primary prompt that appeared in the terminal.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"3_Customization_Examples_of_Bash_PS1_Variable\"><\/span>3 Customization Examples of Bash PS1 Variable<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">You can use the <strong>Bash PS1 variable<\/strong> for different temporary customization purposes lasted for the current shell. Here, in the following section, I am demonstrating three examples of the <strong>PS1 variable<\/strong> in Bash.<\/p>\n<p style=\"text-align: justify;\"><div class=\"su-note\"  style=\"border-color:#e5e3d9;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFFDF3;border-color:#ffffff;color:#333333;\">The default command prompt will appear when you\u2019ll reopen the terminal. So, you can read <a href=\"#Customize-the-PS1-Values-Permanently\"><strong>this section<\/strong><\/a> to save the values of the PS1 variable permanently.<\/div><\/div>\n<h3><span class=\"ez-toc-section\" id=\"1_Display_the_Date_and_Time_in_the_Bash_Prompt\"><\/span>1. Display the Date and Time in the Bash Prompt<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">To display the current date and time using the <strong>PS1 variable <\/strong>in Bash, run the following command with the escape sequences:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">export PS1=&quot;\\u@\\h [\\$(date &#039;+%Y-%m-%d %H:%M:%S&#039;)] \\w \\$ &quot;<\/code><\/pre>\n<div class=\"su-box su-box-style-default\" id=\"\" style=\"border-color:#aeb0b3;border-radius:0px;max-width:none\"><div class=\"su-box-title\" style=\"background-color:#E1E3E6;color:#000000;border-top-left-radius:0px;border-top-right-radius:0px\"> EXPLANATION<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:0px;border-bottom-right-radius:0px\">\n<ul>\n<li><a href=\"https:\/\/linuxsimply.com\/export-command-in-linux\/\" target=\"_blank\" rel=\"noopener\"><strong>export<\/strong><\/a><strong> PS1<\/strong>: It temporarily sets the values of the <strong>PS1 variable<\/strong> for the current shell session.<\/li>\n<li><strong>\\u<\/strong>: It represents the <strong>username <\/strong>of the current user.<\/li>\n<li><strong>\\h<\/strong>: It represents the <strong>hostname <\/strong>of the device.<\/li>\n<li style=\"text-align: justify;\"><strong>[\\$(date &#8216;+%Y-%m-%d %H:%M:%S&#8217;)]<\/strong>: The <strong>[&#8230;]<\/strong> syntax contains the current date and time. And the <strong>\\$(&#8230;)<\/strong> syntax inside the <strong>[&#8230;]<\/strong> allows to include the output of the executed command in the prompt. Here, I have executed the <strong>date<\/strong> command with the format <strong>&#8216;+%Y-%m-%d %H:%M:%S&#8217;<\/strong>\u00a0which resembles the <strong>year<\/strong>, <strong>month<\/strong>, <strong>day<\/strong>, <strong>hour<\/strong>, <strong>minute<\/strong>, <strong>second<\/strong>.<\/li>\n<li><strong>\\w<\/strong>: It symbolizes the full path of the current working directory.<\/li>\n<li><strong>\\$<\/strong>: It indicates the end of the prompt.<\/li>\n<\/ul>\n<\/div><\/div>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-17079\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img2-Displaying-date-and-time-using-customized-PS1-variable.png\" alt=\"Displaying date and time using customized PS1 variable\" width=\"825\" height=\"170\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img2-Displaying-date-and-time-using-customized-PS1-variable.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img2-Displaying-date-and-time-using-customized-PS1-variable-300x62.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img2-Displaying-date-and-time-using-customized-PS1-variable-767x158.png 767w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<p style=\"text-align: justify;\">In the above image, I have run the <strong>export <\/strong>command with the customized value of the <strong>PS1 variable<\/strong>. Hence, you can see <strong>nadiba <\/strong>as the <strong>Username<\/strong>, <strong>Ubuntu <\/strong>as the <strong>Hostname<\/strong>, <strong>2023-08-20<\/strong>\u00a0as the current <strong>Date<\/strong>, <strong>01:45:17<\/strong>\u00a0as the current <strong>Time<\/strong>, and <strong>~\/Desktop <\/strong>as the full path of the current <strong>Working Directory<\/strong> when I executed the command.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"2_Change_the_Background_and_Foreground_Color_of_Bash_Prompt\"><\/span>2. Change the Background and Foreground Color of Bash Prompt<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">You can use different color codes with the escape character and change the background and foreground colors of the command prompt. Have a look at the following list of some basic ANSII escape codes for background and foreground color output:<\/p>\n<p><span style=\"font-weight: 400;\"><div class=\"su-table su-table-responsive su-table-alternate su-table-fixed\"><\/span><\/p>\n<table style=\"width: 100%\" width=\"100%\">\n<tbody>\n<tr>\n<th style=\"width: 156px;text-align: center;vertical-align: middle\" width=\"156\"><strong>Color Name<\/strong><\/th>\n<th style=\"width: 228px;text-align: center;vertical-align: middle\" width=\"228\"><strong>Background Color Code<\/strong><\/th>\n<th style=\"width: 216px;text-align: center;vertical-align: middle\" width=\"216\"><strong>Foreground Color Code<\/strong><\/th>\n<\/tr>\n<tr>\n<td style=\"text-align: center;vertical-align: middle\" width=\"156\">Dark Gray<\/td>\n<td style=\"text-align: center;vertical-align: middle\" width=\"228\">40<\/td>\n<td style=\"text-align: center;vertical-align: middle\" width=\"216\">30<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;vertical-align: middle\" width=\"156\">Red<\/td>\n<td style=\"text-align: center;vertical-align: middle\" width=\"228\">41<\/td>\n<td style=\"text-align: center;vertical-align: middle\" width=\"216\">31<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;vertical-align: middle\" width=\"156\">Green<\/td>\n<td style=\"text-align: center;vertical-align: middle\" width=\"228\">42<\/td>\n<td style=\"text-align: center;vertical-align: middle\" width=\"216\">32<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;vertical-align: middle\" width=\"156\">Yellow<\/td>\n<td style=\"text-align: center;vertical-align: middle\" width=\"228\">43<\/td>\n<td style=\"text-align: center;vertical-align: middle\" width=\"216\">33<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;vertical-align: middle\" width=\"156\">Blue<\/td>\n<td style=\"text-align: center;vertical-align: middle\" width=\"228\">44<\/td>\n<td style=\"text-align: center;vertical-align: middle\" width=\"216\">34<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;vertical-align: middle\" width=\"156\">Purple<\/td>\n<td style=\"text-align: center;vertical-align: middle\" width=\"228\">45<\/td>\n<td style=\"text-align: center;vertical-align: middle\" width=\"216\">35<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;vertical-align: middle\" width=\"156\">Cyan<\/td>\n<td style=\"text-align: center;vertical-align: middle\" width=\"228\">46<\/td>\n<td style=\"text-align: center;vertical-align: middle\" width=\"216\">36<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;vertical-align: middle\" width=\"156\">Light Gray<\/td>\n<td style=\"text-align: center;vertical-align: middle\" width=\"228\">47<\/td>\n<td style=\"text-align: center;vertical-align: middle\" width=\"216\">37<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;vertical-align: middle\">White<\/td>\n<td style=\"text-align: center;vertical-align: middle\">107<\/td>\n<td style=\"text-align: center;vertical-align: middle\">97<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Now, to change the background color, run the following command in your terminal:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">export PS1=&quot;\\[\\e[44m\\]\\u@\\h \\w \\$ \\[\\e[m\\]&quot;<\/code><\/pre>\n<div class=\"su-box su-box-style-default\" id=\"\" style=\"border-color:#aeb0b3;border-radius:0px;max-width:none\"><div class=\"su-box-title\" style=\"background-color:#E1E3E6;color:#000000;border-top-left-radius:0px;border-top-right-radius:0px\"> EXPLANATION<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:0px;border-bottom-right-radius:0px\">\n<ul>\n<li><strong>\\[\\e[44m\\]<\/strong>: It sets the <strong>background color<\/strong> to <strong>Blue (44)<\/strong>. Here, the character <strong>m<\/strong>\u00a0is used to set the sequence.<\/li>\n<li><strong>\\u@\\h<\/strong>: It displays the <strong>username <\/strong>&amp; the<strong> hostname<\/strong>.<\/li>\n<li><strong>\\w<\/strong>: It displays the full path of the current working directory.<\/li>\n<li><strong>\\$<\/strong>: It indicates the end of the prompt.<\/li>\n<li><strong>\\[\\e[m\\]<\/strong>: It resets the color formatting to the default.<\/li>\n<\/ul>\n<\/div><\/div>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-17080\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img3-Changing-the-background-color-to-Blue.png\" alt=\"Changing the background color to 'Blue'\" width=\"825\" height=\"145\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img3-Changing-the-background-color-to-Blue.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img3-Changing-the-background-color-to-Blue-300x53.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img3-Changing-the-background-color-to-Blue-762x134.png 762w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<p style=\"text-align: justify;\">From the above image, you can see that I have changed the background color of the Bash prompt to <strong>Blue <\/strong>by using the accurate <strong>color code<\/strong> <strong>44<\/strong>.<\/p>\n<p>Similarly, to change the foreground color, run the command below:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">export PS1=&quot;\\[\\e[97m\\]\\u@\\h \\w \\$ \\[\\e[m\\]&quot;<\/code><\/pre>\n<div class=\"su-box su-box-style-default\" id=\"\" style=\"border-color:#aeb0b3;border-radius:0px;max-width:none\"><div class=\"su-box-title\" style=\"background-color:#E1E3E6;color:#000000;border-top-left-radius:0px;border-top-right-radius:0px\"> EXPLANATION<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:0px;border-bottom-right-radius:0px\">\n<ul>\n<li><strong>\\[\\e[97m\\]<\/strong>: It sets the <strong>foreground color<\/strong> to <strong>White (97)<\/strong>. Here, the character <strong>m<\/strong>\u00a0is used to set the sequence.<\/li>\n<\/ul>\n<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-17141\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img4-Changing-the-foreground-color-to-White-1.png\" alt=\"Changing the foreground color to 'White'\" width=\"825\" height=\"166\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img4-Changing-the-foreground-color-to-White-1.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img4-Changing-the-foreground-color-to-White-1-300x60.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img4-Changing-the-foreground-color-to-White-1-765x154.png 765w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<p style=\"text-align: justify;\">From the above image, you can see that I have changed the foreground color of the Bash prompt to <strong>White <\/strong>by using the accurate <strong>color code<\/strong> <strong>97<\/strong>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"3_Display_Emoji_in_the_Bash_Prompt\"><\/span>3. Display Emoji in the Bash Prompt<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">If you want to display emoji characters in your command prompt, you need to copy &amp; paste the specific <strong>Unicode <\/strong>escape sequences for different emojis. By using the <strong>bytes value<\/strong> of the emoji character, you can incorporate these sequences into your <strong>PS1 configuration<\/strong> and add a glimpse of fun to your command prompt.<\/p>\n<p style=\"text-align: justify;\">Let\u2019s run the following command to display the emoji in the Bash command prompt:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">export PS1=&quot;\\u@\\h \\w \ud83d\ude0e \\$ &quot;<\/code><\/pre>\n<div class=\"su-box su-box-style-default\" id=\"\" style=\"border-color:#aeb0b3;border-radius:0px;max-width:none\"><div class=\"su-box-title\" style=\"background-color:#E1E3E6;color:#000000;border-top-left-radius:0px;border-top-right-radius:0px\"> EXPLANATION<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:0px;border-bottom-right-radius:0px\">\n<ul>\n<li><strong>\ud83d\ude0e<\/strong>: It represents the <strong>Unicode character<\/strong> for the <strong>cool <\/strong>face emoji.<\/li>\n<\/ul>\n<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-17082\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img5-Displaying-emoji-in-command-prompt.png\" alt=\"Displaying emoji in command prompt\" width=\"825\" height=\"177\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img5-Displaying-emoji-in-command-prompt.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img5-Displaying-emoji-in-command-prompt-300x64.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img5-Displaying-emoji-in-command-prompt-764x164.png 764w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<p style=\"text-align: justify;\">From the above image, you can see that I have added a <strong>cool<\/strong>\u00a0face emoji to my Bash prompt. You can choose and display any emoji of your choice from different websites that provide Unicode characters.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Whats_So_Special_About_Bash_PS1_Variable\"><\/span>What\u2019s So Special About Bash PS1 Variable?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">In Bash, the <strong>PS1 variable<\/strong> is so special as it controls the format and behavior of the primary prompt of the shell. Here are the facts that make the PS1 variable so special:<\/p>\n<ul>\n<li style=\"text-align: justify;\"><strong>Smooth Interaction<\/strong>: As a user, you can interact with your shell in the primary prompt provided by the PS1 variable. This prompt provides essential information and confirms a smooth user interaction.<\/li>\n<li style=\"text-align: justify;\"><strong>Customization<\/strong>: The PS1 variable allows you to customize your command line experience more effectively by tailoring the primary prompt to display information according to your needs and preferences.<\/li>\n<li style=\"text-align: justify;\"><strong>Dynamic Contents<\/strong>: Displaying dynamic elements is another special factor of the Bash PS1 variable. By using the <strong>escape sequences<\/strong> and <strong>command substitutions<\/strong>, you can add dynamic content to your prompt.<\/li>\n<li style=\"text-align: justify;\"><strong>Shell Scripting<\/strong>: The PS1 variable plays a crucial role in shell scripting too. During shell scripting, the modification of the PS1 variable helps to convey necessary prompts and alerts to the users.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"How_to_Customize_the_PS1_Values_Permanently_in_Bash_Command_Prompt\"><\/span><a id=\"Customize-the-PS1-Values-Permanently\"><\/a>How to Customize the PS1 Values Permanently in Bash Command Prompt<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To customize the values of the <strong>PS1 variable<\/strong> permanently in bash, follow the steps below:<\/p>\n<ol>\n<li>Open the <code class=\"\" data-line=\"\">~\/.bashrc\u00a0<\/code>file using a text editor by running the command below:\n<pre><code class=\"language-bash\" data-line=\"\">sudo nano ~\/.bashrc<\/code><\/pre>\n<div class=\"su-box su-box-style-default\" id=\"\" style=\"border-color:#aeb0b3;border-radius:0px;max-width:none\"><div class=\"su-box-title\" style=\"background-color:#E1E3E6;color:#000000;border-top-left-radius:0px;border-top-right-radius:0px\"> EXPLANATION<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:0px;border-bottom-right-radius:0px\">\n<ul>\n<li><a href=\"https:\/\/linuxsimply.com\/sudo-command-in-linux\/\" target=\"_blank\" rel=\"noopener\"><strong>sudo<\/strong><\/a>: Super User DO.<\/li>\n<li><a href=\"https:\/\/linuxsimply.com\/nano-command-in-linux\/\" target=\"_blank\" rel=\"noopener\"><strong>nano<\/strong><\/a>: A text editor.<\/li>\n<li><strong>~\/.bashrc<\/strong>: The path to the user-specific configuration file for the Bash shell.<\/li>\n<\/ul>\n<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-17083\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img6-Opening-.bashrc-file-in-Nano-text-editor.png\" alt=\"Opening '.bashrc' file in Nano text editor\" width=\"700\" height=\"143\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img6-Opening-.bashrc-file-in-Nano-text-editor.png 700w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img6-Opening-.bashrc-file-in-Nano-text-editor-300x61.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img6-Opening-.bashrc-file-in-Nano-text-editor-764x156.png 764w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/li>\n<li>\n<p style=\"text-align: justify;\">Now, scroll down and write the customized PS1 values you want to display at the end of the file. Here, I have mentioned an example for displaying the current date and time permanently in the Bash prompt:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">#Displaying current date and time\nPS1=&quot;\\u@\\h [\\$(date &#039;+%Y-%m-%d %H:%M:%S&#039;)] \\w \\$ &quot;<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-17084\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img7-Setting-the-PS1-values-in-.bashrc-file.png\" alt=\"Setting the PS1 values in '.bashrc' file\" width=\"825\" height=\"366\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img7-Setting-the-PS1-values-in-.bashrc-file.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img7-Setting-the-PS1-values-in-.bashrc-file-300x133.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img7-Setting-the-PS1-values-in-.bashrc-file-766x340.png 766w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/li>\n<li>Click on <strong>CTRL+S<\/strong> to save the file and <strong>CTRL+X <\/strong>to exit.<\/li>\n<li>Now, to make the changes reset in your current terminal, run the command:\n<pre><code class=\"language-bash\" data-line=\"\">source ~\/.bashrc<\/code><\/pre>\n<div class=\"su-box su-box-style-default\" id=\"\" style=\"border-color:#aeb0b3;border-radius:0px;max-width:none\"><div class=\"su-box-title\" style=\"background-color:#E1E3E6;color:#000000;border-top-left-radius:0px;border-top-right-radius:0px\"> EXPLANATION<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:0px;border-bottom-right-radius:0px\">\n<ul>\n<li><strong>source<\/strong>: It executes the contents of a script file.<\/li>\n<li><strong>~\/.bashrc<\/strong>: The path to the user-specific configuration file for the Bash shell.<\/li>\n<\/ul>\n<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-17085\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img8-Setting-the-changed-command-prompt-permanent.png\" alt=\"Setting the changed command prompt permanent\" width=\"825\" height=\"81\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img8-Setting-the-changed-command-prompt-permanent.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img8-Setting-the-changed-command-prompt-permanent-300x29.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/img8-Setting-the-changed-command-prompt-permanent-764x75.png 764w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<p style=\"text-align: justify;\">After all the procedures, you\u2019ll see that the default command prompt has been changed and whenever you open a new terminal, the changes made in the prompt will remain permanent.<\/p>\n<\/li>\n<\/ol>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">Wrapping up the whole article, whether you are a regular Linux user or not, by exploring the customizing capabilities of the <strong>PS1 variable<\/strong> with different configurations, you can personalize and optimize your Bash prompt and alters your command-line interactions into a more enjoyable experience.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"People_Also_Ask\"><\/span>People Also Ask<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"What_do_you_mean_by_escape_sequences_in_the_PS1_variable_in_Bash\"><\/span>What do you mean by escape sequences in the PS1 variable in Bash?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">Escape sequences refer to the special characters that direct the terminal to perform some particular operations, such as including username, hostname, changing text color, etc.<\/p>\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"How_to_make_my_custom_PS1_persistent\"><\/span>How to make my custom PS1 persistent?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">Save the configuration file after modifying the <strong>PS1 variable <\/strong>and restart your terminal or run <code class=\"\" data-line=\"\">source ~\/.bashrc<\/code>\u00a0to make the custom PS1 persistent.<\/p>\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Does_PS1_support_variables_and_command_substitution\"><\/span>Does PS1 support variables and command substitution?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\"><strong>Yes<\/strong>, <strong>PS1 <\/strong>supports variables and command substitution to display dynamic information. For example, <code class=\"\" data-line=\"\">$(command)<\/code> holds the output of a command, <code class=\"\" data-line=\"\">\/h<\/code>\u00a0specifies the hostname, etc.<\/p>\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"How_to_reset_the_prompts_text_and_color_formatting\"><\/span>How to reset the prompt\u2019s text and color formatting?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">To reset the prompt\u2019s text and color formatting, append the escape sequence <code class=\"\" data-line=\"\">\\[\\e[m\\]<\/code>.<\/p>\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Are_there_any_variables_related_to_prompt_except_PS1\"><\/span>Are there any variables related to prompt except PS1?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\"><strong>Yes<\/strong>, there are more prompt-related variables like <strong>PS2<\/strong>, <strong>PS3<\/strong>, and <strong>PS4<\/strong>.<\/p>\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Is_it_possible_to_share_the_custom_prompt_configurations\"><\/span>Is it possible to share the custom prompt configurations?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\"><strong>Yes<\/strong>, it is possible to share the custom prompt configurations by sharing the shell configuration files with others.<\/p>\n<p><script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"FAQPage\",\n  \"mainEntity\": [{\n    \"@type\": \"Question\",\n    \"name\": \"What do you mean by escape sequences in the PS1 variable in Bash?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"Escape sequences refer to the special characters that direct the terminal to perform some particular operations, such as including username, hostname, changing text color, etc.\"\n    }\n  },{\n    \"@type\": \"Question\",\n    \"name\": \"How to make my custom PS1 persistent?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"Save the configuration file after modifying the PS1 variable and restart your terminal or run source ~\/.bashrc\u00a0to make the custom PS1 persistent.\"\n    }\n  },{\n    \"@type\": \"Question\",\n    \"name\": \"Does PS1 support variables and command substitution?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"Yes, PS1 supports variables and command substitution to display dynamic information. For example, $(command) holds the output of a command, \/h\u00a0specifies the hostname, etc.\"\n    }\n  },{\n    \"@type\": \"Question\",\n    \"name\": \"Are there any variables related to prompt except PS1?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"Yes, there are more prompt-related variables like PS2, PS3, and PS4.\"\n    }\n  },{\n    \"@type\": \"Question\",\n    \"name\": \"Is it possible to share the custom prompt configurations?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"Yes, it is possible to share the custom prompt configurations by sharing the shell configuration files with others.\"\n    }\n  }]\n}\n<\/script><br \/>\n<span style=\"font-size: 18pt; color: #003366;\"><strong>Related Articles<\/strong><\/span><\/p>\n<ul>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/built-in-variables\/\" target=\"_blank\" rel=\"noopener\">What Are Built-in Variables in Bash [2 Cases With Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/environment-variables\/\" target=\"_blank\" rel=\"noopener\">An Ultimate Guide of Using Bash Environment Variables<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/bashrc-environment-variable\/\" target=\"_blank\" rel=\"noopener\">The \u201c.bashrc\u201d Environment Variables [4 Cases]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/string-variable\/\" target=\"_blank\" rel=\"noopener\">String Variables in Bash [Manipulation, Interpolation &amp; Testing]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/array-variable\/\" target=\"_blank\" rel=\"noopener\">What is Variable Array in Bash? [4 Cases]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/special-variables\/\" target=\"_blank\" rel=\"noopener\">An Extensive Exploration of Bash Special Variables [9 Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/boolean-variables\/\" target=\"_blank\" rel=\"noopener\">What is Boolean Variable in Bash? [3 Cases With Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/heredoc-variable\/\" target=\"_blank\" rel=\"noopener\">What is HereDoc Variable in Bash? [5 Practical Cases]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps3\/\" target=\"_blank\" rel=\"noopener\">What is PS3 Variable in Bash? [3 Practical Examples]<\/a><\/strong><\/li>\n<\/ul>\n<hr \/>\n<p><strong>&lt;&lt; Go Back to <span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Types of Variables in Bash&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:1065857,&quot;3&quot;:{&quot;1&quot;:0},&quot;10&quot;:1,&quot;11&quot;:4,&quot;12&quot;:0,&quot;17&quot;:1,&quot;23&quot;:1}\" data-sheets-hyperlink=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/\"><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/\" target=\"_blank\" rel=\"noopener\">Types of Variables in Bash<\/a><\/span> | <span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Bash Variable&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:16768,&quot;10&quot;:1,&quot;11&quot;:4,&quot;17&quot;:1}\" data-sheets-hyperlink=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/\"><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/\" target=\"_blank\" rel=\"noopener\">Bash Variables<\/a><\/span> | <a href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/\" target=\"_blank\" rel=\"noopener\">Bash Scripting Tutorial<\/a><\/strong><\/p>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-center kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;center&quot;,&quot;id&quot;:&quot;17018&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;0&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;0&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;Rate this post&quot;,&quot;legend&quot;:&quot;0\\\/5 - (0 votes)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;What is PS1 Variable in Bash? [3 Customization Examples]&quot;,&quot;width&quot;:&quot;0&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 0px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            <span class=\"kksr-muted\">Rate this post<\/span>\n    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>In Bash, the PS1 variable plays a pivotal role in shaping and enhancing the command line experience. This is such &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"What is PS1 Variable in Bash? [3 Customization Examples]\" class=\"read-more button\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#more-17018\" aria-label=\"Read more about What is PS1 Variable in Bash? [3 Customization Examples]\">Read more<\/a><\/p>\n","protected":false},"author":314905,"featured_media":17065,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[102],"tags":[120],"class_list":["post-17018","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bash-scripting","tag-variable-types","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is PS1 Variable in Bash? [3 Customization Examples]<\/title>\n<meta name=\"description\" content=\"Explore Bash PS1 variable and create a personalized command prompt that aligns your preference and enhances your workflow.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is PS1 Variable in Bash? [3 Customization Examples]\" \/>\n<meta property=\"og:description\" content=\"Explore Bash PS1 variable and create a personalized command prompt that aligns your preference and enhances your workflow.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxSimply\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/nadiba.rahman?mibextid=ZbWKwL\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-21T06:40:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-31T07:42:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/Feature-image-Bash-PS1-variable.png\" \/>\n\t<meta property=\"og:image:width\" content=\"400\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Nadiba Rahman\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nadiba Rahman\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/variables\\\/types\\\/ps1\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/variables\\\/types\\\/ps1\\\/\"},\"author\":{\"name\":\"Nadiba Rahman\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/person\\\/69b717a03a5d9dc48e683aaffe22d33f\"},\"headline\":\"What is PS1 Variable in Bash? [3 Customization Examples]\",\"datePublished\":\"2023-08-21T06:40:51+00:00\",\"dateModified\":\"2023-12-31T07:42:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/variables\\\/types\\\/ps1\\\/\"},\"wordCount\":1784,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/variables\\\/types\\\/ps1\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/Feature-image-Bash-PS1-variable.png\",\"keywords\":[\"variable types\"],\"articleSection\":[\"Bash Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/variables\\\/types\\\/ps1\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/variables\\\/types\\\/ps1\\\/\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/variables\\\/types\\\/ps1\\\/\",\"name\":\"What is PS1 Variable in Bash? [3 Customization Examples]\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/variables\\\/types\\\/ps1\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/variables\\\/types\\\/ps1\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/Feature-image-Bash-PS1-variable.png\",\"datePublished\":\"2023-08-21T06:40:51+00:00\",\"dateModified\":\"2023-12-31T07:42:27+00:00\",\"description\":\"Explore Bash PS1 variable and create a personalized command prompt that aligns your preference and enhances your workflow.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/variables\\\/types\\\/ps1\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/variables\\\/types\\\/ps1\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/variables\\\/types\\\/ps1\\\/#primaryimage\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/Feature-image-Bash-PS1-variable.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/Feature-image-Bash-PS1-variable.png\",\"width\":400,\"height\":400,\"caption\":\"Feature image-Bash PS1 variable\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/variables\\\/types\\\/ps1\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Bash Scripting Tutorial\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Bash Variables\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/variables\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Types of Variables in Bash\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/bash-scripting-tutorial\\\/variables\\\/types\\\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"What is PS1 Variable in Bash? [3 Customization Examples]\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#website\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/\",\"name\":\"LinuxSimply\",\"description\":\"All About Linux\",\"publisher\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/linuxsimply.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\",\"name\":\"LinuxSimply\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/LinuxSimply-New-Logo-Without-Icon.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/LinuxSimply-New-Logo-Without-Icon.png\",\"width\":355,\"height\":48,\"caption\":\"LinuxSimply\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/person\\\/69b717a03a5d9dc48e683aaffe22d33f\",\"name\":\"Nadiba Rahman\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Nadiba-Rahman-II-96x96.png\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Nadiba-Rahman-II-96x96.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Nadiba-Rahman-II-96x96.png\",\"caption\":\"Nadiba Rahman\"},\"description\":\"Hello, This is Nadiba Rahman, currently working as a Linux Content Developer Executive at SOFTEKO. I have completed my graduation with a bachelor\u2019s degree in Electronics &amp; Telecommunication Engineering from Rajshahi University of Engineering &amp; Technology (RUET).I am quite passionate about crafting. I really adore exploring and learning new things which always helps me to think transparently. And this curiosity led me to pursue knowledge about Linux. My goal is to portray Linux-based practical problems and share them with you. Read Full Bio\",\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/nadiba.rahman?mibextid=ZbWKwL\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/nadiba-rahman-443459171\"],\"url\":\"https:\\\/\\\/linuxsimply.com\\\/author\\\/nadiba\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is PS1 Variable in Bash? [3 Customization Examples]","description":"Explore Bash PS1 variable and create a personalized command prompt that aligns your preference and enhances your workflow.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/","og_locale":"en_US","og_type":"article","og_title":"What is PS1 Variable in Bash? [3 Customization Examples]","og_description":"Explore Bash PS1 variable and create a personalized command prompt that aligns your preference and enhances your workflow.","og_url":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/","og_site_name":"LinuxSimply","article_author":"https:\/\/www.facebook.com\/nadiba.rahman?mibextid=ZbWKwL","article_published_time":"2023-08-21T06:40:51+00:00","article_modified_time":"2023-12-31T07:42:27+00:00","og_image":[{"width":400,"height":400,"url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/Feature-image-Bash-PS1-variable.png","type":"image\/png"}],"author":"Nadiba Rahman","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Nadiba Rahman","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#article","isPartOf":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/"},"author":{"name":"Nadiba Rahman","@id":"https:\/\/linuxsimply.com\/#\/schema\/person\/69b717a03a5d9dc48e683aaffe22d33f"},"headline":"What is PS1 Variable in Bash? [3 Customization Examples]","datePublished":"2023-08-21T06:40:51+00:00","dateModified":"2023-12-31T07:42:27+00:00","mainEntityOfPage":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/"},"wordCount":1784,"commentCount":0,"publisher":{"@id":"https:\/\/linuxsimply.com\/#organization"},"image":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/Feature-image-Bash-PS1-variable.png","keywords":["variable types"],"articleSection":["Bash Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/","url":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/","name":"What is PS1 Variable in Bash? [3 Customization Examples]","isPartOf":{"@id":"https:\/\/linuxsimply.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#primaryimage"},"image":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/Feature-image-Bash-PS1-variable.png","datePublished":"2023-08-21T06:40:51+00:00","dateModified":"2023-12-31T07:42:27+00:00","description":"Explore Bash PS1 variable and create a personalized command prompt that aligns your preference and enhances your workflow.","breadcrumb":{"@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#primaryimage","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/Feature-image-Bash-PS1-variable.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/08\/Feature-image-Bash-PS1-variable.png","width":400,"height":400,"caption":"Feature image-Bash PS1 variable"},{"@type":"BreadcrumbList","@id":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/ps1\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/linuxsimply.com\/"},{"@type":"ListItem","position":2,"name":"Bash Scripting Tutorial","item":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/"},{"@type":"ListItem","position":3,"name":"Bash Variables","item":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/"},{"@type":"ListItem","position":4,"name":"Types of Variables in Bash","item":"https:\/\/linuxsimply.com\/bash-scripting-tutorial\/variables\/types\/"},{"@type":"ListItem","position":5,"name":"What is PS1 Variable in Bash? [3 Customization Examples]"}]},{"@type":"WebSite","@id":"https:\/\/linuxsimply.com\/#website","url":"https:\/\/linuxsimply.com\/","name":"LinuxSimply","description":"All About Linux","publisher":{"@id":"https:\/\/linuxsimply.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/linuxsimply.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/linuxsimply.com\/#organization","name":"LinuxSimply","url":"https:\/\/linuxsimply.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/#\/schema\/logo\/image\/","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/LinuxSimply-New-Logo-Without-Icon.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/LinuxSimply-New-Logo-Without-Icon.png","width":355,"height":48,"caption":"LinuxSimply"},"image":{"@id":"https:\/\/linuxsimply.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/linuxsimply.com\/#\/schema\/person\/69b717a03a5d9dc48e683aaffe22d33f","name":"Nadiba Rahman","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Nadiba-Rahman-II-96x96.png","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Nadiba-Rahman-II-96x96.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Nadiba-Rahman-II-96x96.png","caption":"Nadiba Rahman"},"description":"Hello, This is Nadiba Rahman, currently working as a Linux Content Developer Executive at SOFTEKO. I have completed my graduation with a bachelor\u2019s degree in Electronics &amp; Telecommunication Engineering from Rajshahi University of Engineering &amp; Technology (RUET).I am quite passionate about crafting. I really adore exploring and learning new things which always helps me to think transparently. And this curiosity led me to pursue knowledge about Linux. My goal is to portray Linux-based practical problems and share them with you. Read Full Bio","sameAs":["https:\/\/www.facebook.com\/nadiba.rahman?mibextid=ZbWKwL","https:\/\/www.linkedin.com\/in\/nadiba-rahman-443459171"],"url":"https:\/\/linuxsimply.com\/author\/nadiba\/"}]}},"_links":{"self":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts\/17018","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/users\/314905"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/comments?post=17018"}],"version-history":[{"count":0,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts\/17018\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/media\/17065"}],"wp:attachment":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/media?parent=17018"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/categories?post=17018"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/tags?post=17018"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}