{"id":357,"date":"2009-05-22T21:11:58","date_gmt":"2009-05-23T02:11:58","guid":{"rendered":"http:\/\/www.gamescheat.ca\/?p=357"},"modified":"2019-09-04T19:57:40","modified_gmt":"2019-09-05T00:57:40","slug":"how-to-determine-the-current-shell-type-in-linux-or-unix","status":"publish","type":"post","link":"http:\/\/www.gamescheat.ca\/?p=357","title":{"rendered":"How to determine the current shell type in Linux or Unix."},"content":{"rendered":"<p>Here is the command to find out what your current shell type is in Linux or Unix.  This works for most variants of Unix, Aix, and Linux.<\/p>\n<div style=\"float: left;\"><div style=\"margin: 15px 15px 15px 15px\";><script type=\"text\/javascript\"><!--\ngoogle_ad_client = \"pub-3319935785736004\";\ngoogle_alternate_color = \"FFFFFF\";\ngoogle_ad_width = 468;\ngoogle_ad_height = 60;\ngoogle_ad_format = \"468x60_as\";\ngoogle_ad_type = \"text_image\";\ngoogle_ad_channel =\"\";\ngoogle_color_border = \"cccccc\";\ngoogle_color_link = \"cc0000\";\ngoogle_color_bg = \"ffffff\";\ngoogle_color_text = \"000000\";\ngoogle_color_url = \"008000\";\n\/\/--><\/script>\n<script type=\"text\/javascript\"\n  src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\n<\/script><\/div><\/div><p>echo $0, this will display the shell type.<\/p>\n<p>echo $SHELL, this will give you more detailed shell type information.<\/p>\n<p><strong>Below is a table of the various shell types and their configuration files<\/strong><\/p>\n<p>Shells read configuration files on multiple circumstances which differ depending on the shell. This table shows the configuration files for popular shells:<\/p>\n<p>(Please Note:  If the table below is not displayed is the right format, then please refresh your screen by clicking on refresh on your browsers toolbar or press the F5 key on your keyboard.)<\/p>\n<table class=\"wikitable\">\n<tr>\n<td><\/td>\n<th style=\"text-align: center;font-weight: bold\">sh<\/th>\n<th style=\"text-align: center;font-weight: bold\">ksh<\/th>\n<th style=\"text-align: center;font-weight: bold\">csh<\/th>\n<th style=\"text-align: center;font-weight: bold\">tcsh<\/th>\n<th style=\"text-align: center;font-weight: bold\">bash<\/th>\n<th style=\"text-align: center;font-weight: bold\">zsh<\/th>\n<\/tr>\n<tr>\n<th style=\"background:#CFCFCF;text-align: left;font-weight: normal\"><code>\/etc\/.login<\/code><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\">login<\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\">login<\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<\/tr>\n<tr>\n<td><code>\/etc\/csh.cshrc<\/code><\/td>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\">yes<\/th>\n<th style=\"text-align: center;font-weight: normal\">yes<\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<\/tr>\n<tr>\n<th style=\"background:#CFCFCF;text-align: left;font-weight: normal\"><code>\/etc\/csh.login<\/code><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\">login<\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\">login<\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<\/tr>\n<tr>\n<td><code>~\/.tcshrc<\/code><\/td>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\">yes<\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<\/tr>\n<tr>\n<th style=\"background:#CFCFCF;text-align: left;font-weight: normal\"><code>~\/.cshrc<\/code><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\">yes<\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\">yes<\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<\/tr>\n<tr>\n<td><code>~\/.login<\/code><\/td>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\">login<\/th>\n<th style=\"text-align: center;font-weight: normal\">login<\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<\/tr>\n<tr>\n<th style=\"background:#CFCFCF;text-align: left;font-weight: normal\"><code>~\/.logout<\/code><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\">login<\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\">login<\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<\/tr>\n<tr>\n<td><code>\/etc\/profile<\/code><\/td>\n<th style=\"text-align: center;font-weight: normal\">login<\/th>\n<th style=\"text-align: center;font-weight: normal\">login<\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\">i.login<\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<\/tr>\n<tr>\n<th style=\"background:#CFCFCF;text-align: left;font-weight: normal\"><code>~\/.profile<\/code><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\">login<\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\">login<\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\">login<\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<\/tr>\n<tr>\n<td><code>~\/.bash_profile<\/code><\/td>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\">login<\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<\/tr>\n<tr>\n<th style=\"background:#CFCFCF;text-align: left;font-weight: normal\"><code>~\/.bash_login<\/code><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\">login<\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<\/tr>\n<tr>\n<th style=\"background:#CFCFCF;text-align: left;font-weight: normal\"><code>~\/.bash_logout<\/code><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\">login<\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<\/tr>\n<tr>\n<td><code>~\/.bashrc<\/code><\/td>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\">n\/login<\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<\/tr>\n<tr>\n<th style=\"background:#CFCFCF;text-align: left;font-weight: normal\"><code>\/etc\/zshenv<\/code><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\">yes<\/th>\n<\/tr>\n<tr>\n<td><code>\/etc\/zprofile<\/code><\/td>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\">login<\/th>\n<\/tr>\n<tr>\n<th style=\"background:#CFCFCF;text-align: left;font-weight: normal\"><code>\/etc\/zshrc<\/code><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\">int.<\/th>\n<\/tr>\n<tr>\n<td><code>\/etc\/zlogin<\/code><\/td>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\">login<\/th>\n<\/tr>\n<tr>\n<th style=\"background:#CFCFCF;text-align: left;font-weight: normal\"><code>\/etc\/zlogout<\/code><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\">login<\/th>\n<\/tr>\n<tr>\n<td><code>~\/.zshenv<\/code><\/td>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\">yes<\/th>\n<\/tr>\n<tr>\n<th style=\"background:#CFCFCF;text-align: left;font-weight: normal\"><code>~\/.zprofile<\/code><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\">login<\/th>\n<\/tr>\n<tr>\n<td><code>~\/.zshrc<\/code><\/td>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\">int.<\/th>\n<\/tr>\n<tr>\n<th style=\"background:#CFCFCF;text-align: left;font-weight: normal\"><code>~\/.zlogin<\/code><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\"><\/th>\n<th style=\"background:#CFCFCF;text-align: center;font-weight: normal\">login<\/th>\n<\/tr>\n<tr>\n<td><code>~\/.zlogout<\/code><\/td>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\"><\/th>\n<th style=\"text-align: center;font-weight: normal\">login<\/th>\n<\/tr>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>Here is the command to find out what your current shell type is in Linux or Unix. This works for most variants of Unix, Aix, and Linux. echo $0, this will display the shell type. echo $SHELL, this will give&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"http:\/\/www.gamescheat.ca\/?p=357\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[19],"tags":[55,35],"_links":{"self":[{"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=\/wp\/v2\/posts\/357"}],"collection":[{"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=357"}],"version-history":[{"count":5,"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=\/wp\/v2\/posts\/357\/revisions"}],"predecessor-version":[{"id":1003,"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=\/wp\/v2\/posts\/357\/revisions\/1003"}],"wp:attachment":[{"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=357"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}