Are there types of Unix shells? [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












I found there are shells like nologin, false, and true. What else are there?



I don't know what is the correct keyword to be used to list the shells. Whenever I search using the keywords linux shell types, I get results in the context of illustrating differences between bash, csh, zsh, and the others.



What is the correct keyword to be used to find more about this subject?










share|improve this question















closed as too broad by Thomas Dickey, l0b0, RalfFriedl, steve, Thomas Sep 9 at 15:34


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.










  • 1




    Nope. Not a duplicate to the question you listed. The question you listed asks about the difference between nologin and false. This is totally different from my question which is about what else are there?
    – joker
    Sep 9 at 10:48










  • Possible duplicate of What's the difference between /sbin/nologin and /bin/false
    – Fólkvangr
    Sep 9 at 11:43










  • That's a duplicate comment of a possible duplicate.
    – joker
    Sep 9 at 18:30














up vote
3
down vote

favorite












I found there are shells like nologin, false, and true. What else are there?



I don't know what is the correct keyword to be used to list the shells. Whenever I search using the keywords linux shell types, I get results in the context of illustrating differences between bash, csh, zsh, and the others.



What is the correct keyword to be used to find more about this subject?










share|improve this question















closed as too broad by Thomas Dickey, l0b0, RalfFriedl, steve, Thomas Sep 9 at 15:34


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.










  • 1




    Nope. Not a duplicate to the question you listed. The question you listed asks about the difference between nologin and false. This is totally different from my question which is about what else are there?
    – joker
    Sep 9 at 10:48










  • Possible duplicate of What's the difference between /sbin/nologin and /bin/false
    – Fólkvangr
    Sep 9 at 11:43










  • That's a duplicate comment of a possible duplicate.
    – joker
    Sep 9 at 18:30












up vote
3
down vote

favorite









up vote
3
down vote

favorite











I found there are shells like nologin, false, and true. What else are there?



I don't know what is the correct keyword to be used to list the shells. Whenever I search using the keywords linux shell types, I get results in the context of illustrating differences between bash, csh, zsh, and the others.



What is the correct keyword to be used to find more about this subject?










share|improve this question















I found there are shells like nologin, false, and true. What else are there?



I don't know what is the correct keyword to be used to list the shells. Whenever I search using the keywords linux shell types, I get results in the context of illustrating differences between bash, csh, zsh, and the others.



What is the correct keyword to be used to find more about this subject?







linux shell login






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 9 at 14:19









Kasper

15412




15412










asked Sep 9 at 10:19









joker

1352




1352




closed as too broad by Thomas Dickey, l0b0, RalfFriedl, steve, Thomas Sep 9 at 15:34


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






closed as too broad by Thomas Dickey, l0b0, RalfFriedl, steve, Thomas Sep 9 at 15:34


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









  • 1




    Nope. Not a duplicate to the question you listed. The question you listed asks about the difference between nologin and false. This is totally different from my question which is about what else are there?
    – joker
    Sep 9 at 10:48










  • Possible duplicate of What's the difference between /sbin/nologin and /bin/false
    – Fólkvangr
    Sep 9 at 11:43










  • That's a duplicate comment of a possible duplicate.
    – joker
    Sep 9 at 18:30












  • 1




    Nope. Not a duplicate to the question you listed. The question you listed asks about the difference between nologin and false. This is totally different from my question which is about what else are there?
    – joker
    Sep 9 at 10:48










  • Possible duplicate of What's the difference between /sbin/nologin and /bin/false
    – Fólkvangr
    Sep 9 at 11:43










  • That's a duplicate comment of a possible duplicate.
    – joker
    Sep 9 at 18:30







1




1




Nope. Not a duplicate to the question you listed. The question you listed asks about the difference between nologin and false. This is totally different from my question which is about what else are there?
– joker
Sep 9 at 10:48




Nope. Not a duplicate to the question you listed. The question you listed asks about the difference between nologin and false. This is totally different from my question which is about what else are there?
– joker
Sep 9 at 10:48












Possible duplicate of What's the difference between /sbin/nologin and /bin/false
– Fólkvangr
Sep 9 at 11:43




Possible duplicate of What's the difference between /sbin/nologin and /bin/false
– Fólkvangr
Sep 9 at 11:43












That's a duplicate comment of a possible duplicate.
– joker
Sep 9 at 18:30




That's a duplicate comment of a possible duplicate.
– joker
Sep 9 at 18:30










5 Answers
5






active

oldest

votes

















up vote
6
down vote













nologin, false, and true, are not shells, they are just ways to prevent login. This leaves the ones ending in sh. So searching in /bin, /usr/bin, etc will help find most that are installed.



Then there is the problem of “what is a shell?” is python, purl, tcl, etc. a shell? Well probably not, but where is the division line? As true, false, and nologin do not interpreters (do not take user input, are not languages, etc), then they are definitely on the not-a-shell side of the line.



However the login shell dose not have to be a shell, it does not even have to be interactive.



You could search on the interweb, using your favorite search engine, for Unix shells.






share|improve this answer






















  • I understand that nologin, false, and true are actually shells and they are used to prevent users from logging in. There is a git shell as well; and it is a shell.
    – joker
    Sep 9 at 10:58






  • 5




    No, they are not shells. false is just a program that does absolutely nothing and immediately exits with a non-zero exit code. true is just a program that does absolutely nothing and immediately exits with a zero exit code. nologin is just a program that does almost nothing, only printing a little message, and then immediately exits. In fact, not being shells is what makes them prevent users from logging in. When you try to use them as shells, it won't work. That's how this works.
    – Jörg W Mittag
    Sep 9 at 11:41


















up vote
4
down vote














I found there are shells like nologin, false, and true. What else are there?




These are not shells, as @ctrl-alt-delor already pointed out.




I don't know what to type to list the shells.




You can't get an exhaustive list of all the shells that exist. That would be like asking for a list of all the pieces of software that exist.




Whenever I search with linux shell types (and the likes), I get results in the context of illustrating differences between bash, csh, zsh, and the others you know.




Which is really handy, because these are popular shells you are likely to encounter.




What is the keyword to use to learn more about the subject?




"shell" is also sometimes referred to as a "REPL", "command-line interpreter" or "command language interpreter".






share|improve this answer



























    up vote
    4
    down vote













    This is a question where the answer is complicated. What most people call a "shell" is a Read-Eval-Print Loop and therefore, even a python interpreter is a shell, provided you are running python interactively. However, this would mean that nologin is not a real shell! So what is a shell?



    Technically speaking, any program can be used as a shell. In fact, here are a few pictures of me using unusual shells:



    1. Python shell as the login shell


    2. Nano as a shell (though you can't distinguish between it being run normally, since it's fullscreen)

    3. Cat running as a shell


    4. Top running as a shell (even though you, again, can't see it being a shell)

    5. And a hello world program!

    However, this isn't what you'd expect to be running as shells. Usually, you'll want to be running one of the shells in /etc/shells. For example, mine contains:



    # /etc/shells: valid login shells
    /bin/sh
    /bin/bash
    /bin/rbash
    /bin/dash
    /usr/bin/tmux
    /usr/bin/screen


    and none of the shells I mentioned previously! So why do they run?



    To put it simply, they do, but only locally. If you look at the shells manpage with man shells, you will discover that /etc/shells is mostly used by programs such as FTP daemons. This is why you don't see the nologin shell in /etc/shells: It prevents login to FTP and other non-login daemons by not being there, while preventing login locally by being a simple printf("This account is currently not available"); program, and not a REPL.



    So, to answer your question: There is only one type of shell, and that is executable. If you can run a program, it's a shell.






    share|improve this answer



























      up vote
      2
      down vote













      To make the point in the other answers more explicit: There's nothing special about "a shell". This




      I understand that nologin, false, and true are actually shells and they are used to prevent users from logging in




      is not true: false and true just happened to be programs that were already available on early Unix systems (and they were used in other contexts). What happened is that there was the situation where there were user accounts that didn't correspond to an actual user. So the question was what to put into the "shell" field in /etc/passwd. Because you can put in any program there, the early sysadmins thought it was a cute hack (and practical) to just use /bin/false. Later sysadmins thought it was a bit too much of a hack, and wrote nologin (now that they had more harddisk space to use) to better document this intention.



      So: You can use any program as the program that gets spawned when a user logs in. Many programs won't make sense (e.g. when they'd need commandline arguments). Some others will. If you get bored, you can write your own. You don't have to put in any special sauce to make it "a shell".






      share|improve this answer



























        up vote
        0
        down vote













        Anything you want.



        A shell is just a TTY application. so anything you can run on a TTY can be a shell.



        One example of an unconventional shell would be a bulletin board service:
        user logs in via ssh or telnet and gets a BBs instead of a command-line






        share|improve this answer






















        • … or uucico or sync or …
          – JdeBP
          Sep 9 at 11:18










        • @Jasen: off-topic answer. Moreover, a POSIX shell is a fundamental system software.
          – Fólkvangr
          Sep 9 at 11:41






        • 1




          The idea that this is off-topic is bizarre, and it says the same as all of the other answers do. The only point of confusion is that the answer is echoing the usage of the question, where "shell" is used to mean the class of program that is named in one field of a user record in the account database.
          – JdeBP
          Sep 9 at 20:57










        • @Folkvangr entries starting /usr/bin/ and /usr/local/bin/ can be used in the shell field (you may need to update the list in /etc/shells to enable these) anything in those directories is not fundamental.
          – Jasen
          Sep 10 at 4:42










        • Your answer is incorrect, partial and confusing since you do not determine the context allowing to develop or justifying your point. How do I know that you are talking about /etc/passwd, /etc/shells or that you are declaring that a shell is essentially a TTY application?
          – Fólkvangr
          Sep 10 at 7:18


















        5 Answers
        5






        active

        oldest

        votes








        5 Answers
        5






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes








        up vote
        6
        down vote













        nologin, false, and true, are not shells, they are just ways to prevent login. This leaves the ones ending in sh. So searching in /bin, /usr/bin, etc will help find most that are installed.



        Then there is the problem of “what is a shell?” is python, purl, tcl, etc. a shell? Well probably not, but where is the division line? As true, false, and nologin do not interpreters (do not take user input, are not languages, etc), then they are definitely on the not-a-shell side of the line.



        However the login shell dose not have to be a shell, it does not even have to be interactive.



        You could search on the interweb, using your favorite search engine, for Unix shells.






        share|improve this answer






















        • I understand that nologin, false, and true are actually shells and they are used to prevent users from logging in. There is a git shell as well; and it is a shell.
          – joker
          Sep 9 at 10:58






        • 5




          No, they are not shells. false is just a program that does absolutely nothing and immediately exits with a non-zero exit code. true is just a program that does absolutely nothing and immediately exits with a zero exit code. nologin is just a program that does almost nothing, only printing a little message, and then immediately exits. In fact, not being shells is what makes them prevent users from logging in. When you try to use them as shells, it won't work. That's how this works.
          – Jörg W Mittag
          Sep 9 at 11:41















        up vote
        6
        down vote













        nologin, false, and true, are not shells, they are just ways to prevent login. This leaves the ones ending in sh. So searching in /bin, /usr/bin, etc will help find most that are installed.



        Then there is the problem of “what is a shell?” is python, purl, tcl, etc. a shell? Well probably not, but where is the division line? As true, false, and nologin do not interpreters (do not take user input, are not languages, etc), then they are definitely on the not-a-shell side of the line.



        However the login shell dose not have to be a shell, it does not even have to be interactive.



        You could search on the interweb, using your favorite search engine, for Unix shells.






        share|improve this answer






















        • I understand that nologin, false, and true are actually shells and they are used to prevent users from logging in. There is a git shell as well; and it is a shell.
          – joker
          Sep 9 at 10:58






        • 5




          No, they are not shells. false is just a program that does absolutely nothing and immediately exits with a non-zero exit code. true is just a program that does absolutely nothing and immediately exits with a zero exit code. nologin is just a program that does almost nothing, only printing a little message, and then immediately exits. In fact, not being shells is what makes them prevent users from logging in. When you try to use them as shells, it won't work. That's how this works.
          – Jörg W Mittag
          Sep 9 at 11:41













        up vote
        6
        down vote










        up vote
        6
        down vote









        nologin, false, and true, are not shells, they are just ways to prevent login. This leaves the ones ending in sh. So searching in /bin, /usr/bin, etc will help find most that are installed.



        Then there is the problem of “what is a shell?” is python, purl, tcl, etc. a shell? Well probably not, but where is the division line? As true, false, and nologin do not interpreters (do not take user input, are not languages, etc), then they are definitely on the not-a-shell side of the line.



        However the login shell dose not have to be a shell, it does not even have to be interactive.



        You could search on the interweb, using your favorite search engine, for Unix shells.






        share|improve this answer














        nologin, false, and true, are not shells, they are just ways to prevent login. This leaves the ones ending in sh. So searching in /bin, /usr/bin, etc will help find most that are installed.



        Then there is the problem of “what is a shell?” is python, purl, tcl, etc. a shell? Well probably not, but where is the division line? As true, false, and nologin do not interpreters (do not take user input, are not languages, etc), then they are definitely on the not-a-shell side of the line.



        However the login shell dose not have to be a shell, it does not even have to be interactive.



        You could search on the interweb, using your favorite search engine, for Unix shells.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Sep 9 at 11:48

























        answered Sep 9 at 10:49









        ctrl-alt-delor

        9,15431948




        9,15431948











        • I understand that nologin, false, and true are actually shells and they are used to prevent users from logging in. There is a git shell as well; and it is a shell.
          – joker
          Sep 9 at 10:58






        • 5




          No, they are not shells. false is just a program that does absolutely nothing and immediately exits with a non-zero exit code. true is just a program that does absolutely nothing and immediately exits with a zero exit code. nologin is just a program that does almost nothing, only printing a little message, and then immediately exits. In fact, not being shells is what makes them prevent users from logging in. When you try to use them as shells, it won't work. That's how this works.
          – Jörg W Mittag
          Sep 9 at 11:41

















        • I understand that nologin, false, and true are actually shells and they are used to prevent users from logging in. There is a git shell as well; and it is a shell.
          – joker
          Sep 9 at 10:58






        • 5




          No, they are not shells. false is just a program that does absolutely nothing and immediately exits with a non-zero exit code. true is just a program that does absolutely nothing and immediately exits with a zero exit code. nologin is just a program that does almost nothing, only printing a little message, and then immediately exits. In fact, not being shells is what makes them prevent users from logging in. When you try to use them as shells, it won't work. That's how this works.
          – Jörg W Mittag
          Sep 9 at 11:41
















        I understand that nologin, false, and true are actually shells and they are used to prevent users from logging in. There is a git shell as well; and it is a shell.
        – joker
        Sep 9 at 10:58




        I understand that nologin, false, and true are actually shells and they are used to prevent users from logging in. There is a git shell as well; and it is a shell.
        – joker
        Sep 9 at 10:58




        5




        5




        No, they are not shells. false is just a program that does absolutely nothing and immediately exits with a non-zero exit code. true is just a program that does absolutely nothing and immediately exits with a zero exit code. nologin is just a program that does almost nothing, only printing a little message, and then immediately exits. In fact, not being shells is what makes them prevent users from logging in. When you try to use them as shells, it won't work. That's how this works.
        – Jörg W Mittag
        Sep 9 at 11:41





        No, they are not shells. false is just a program that does absolutely nothing and immediately exits with a non-zero exit code. true is just a program that does absolutely nothing and immediately exits with a zero exit code. nologin is just a program that does almost nothing, only printing a little message, and then immediately exits. In fact, not being shells is what makes them prevent users from logging in. When you try to use them as shells, it won't work. That's how this works.
        – Jörg W Mittag
        Sep 9 at 11:41













        up vote
        4
        down vote














        I found there are shells like nologin, false, and true. What else are there?




        These are not shells, as @ctrl-alt-delor already pointed out.




        I don't know what to type to list the shells.




        You can't get an exhaustive list of all the shells that exist. That would be like asking for a list of all the pieces of software that exist.




        Whenever I search with linux shell types (and the likes), I get results in the context of illustrating differences between bash, csh, zsh, and the others you know.




        Which is really handy, because these are popular shells you are likely to encounter.




        What is the keyword to use to learn more about the subject?




        "shell" is also sometimes referred to as a "REPL", "command-line interpreter" or "command language interpreter".






        share|improve this answer
























          up vote
          4
          down vote














          I found there are shells like nologin, false, and true. What else are there?




          These are not shells, as @ctrl-alt-delor already pointed out.




          I don't know what to type to list the shells.




          You can't get an exhaustive list of all the shells that exist. That would be like asking for a list of all the pieces of software that exist.




          Whenever I search with linux shell types (and the likes), I get results in the context of illustrating differences between bash, csh, zsh, and the others you know.




          Which is really handy, because these are popular shells you are likely to encounter.




          What is the keyword to use to learn more about the subject?




          "shell" is also sometimes referred to as a "REPL", "command-line interpreter" or "command language interpreter".






          share|improve this answer






















            up vote
            4
            down vote










            up vote
            4
            down vote










            I found there are shells like nologin, false, and true. What else are there?




            These are not shells, as @ctrl-alt-delor already pointed out.




            I don't know what to type to list the shells.




            You can't get an exhaustive list of all the shells that exist. That would be like asking for a list of all the pieces of software that exist.




            Whenever I search with linux shell types (and the likes), I get results in the context of illustrating differences between bash, csh, zsh, and the others you know.




            Which is really handy, because these are popular shells you are likely to encounter.




            What is the keyword to use to learn more about the subject?




            "shell" is also sometimes referred to as a "REPL", "command-line interpreter" or "command language interpreter".






            share|improve this answer













            I found there are shells like nologin, false, and true. What else are there?




            These are not shells, as @ctrl-alt-delor already pointed out.




            I don't know what to type to list the shells.




            You can't get an exhaustive list of all the shells that exist. That would be like asking for a list of all the pieces of software that exist.




            Whenever I search with linux shell types (and the likes), I get results in the context of illustrating differences between bash, csh, zsh, and the others you know.




            Which is really handy, because these are popular shells you are likely to encounter.




            What is the keyword to use to learn more about the subject?




            "shell" is also sometimes referred to as a "REPL", "command-line interpreter" or "command language interpreter".







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Sep 9 at 11:05









            l0b0

            26.3k17106232




            26.3k17106232




















                up vote
                4
                down vote













                This is a question where the answer is complicated. What most people call a "shell" is a Read-Eval-Print Loop and therefore, even a python interpreter is a shell, provided you are running python interactively. However, this would mean that nologin is not a real shell! So what is a shell?



                Technically speaking, any program can be used as a shell. In fact, here are a few pictures of me using unusual shells:



                1. Python shell as the login shell


                2. Nano as a shell (though you can't distinguish between it being run normally, since it's fullscreen)

                3. Cat running as a shell


                4. Top running as a shell (even though you, again, can't see it being a shell)

                5. And a hello world program!

                However, this isn't what you'd expect to be running as shells. Usually, you'll want to be running one of the shells in /etc/shells. For example, mine contains:



                # /etc/shells: valid login shells
                /bin/sh
                /bin/bash
                /bin/rbash
                /bin/dash
                /usr/bin/tmux
                /usr/bin/screen


                and none of the shells I mentioned previously! So why do they run?



                To put it simply, they do, but only locally. If you look at the shells manpage with man shells, you will discover that /etc/shells is mostly used by programs such as FTP daemons. This is why you don't see the nologin shell in /etc/shells: It prevents login to FTP and other non-login daemons by not being there, while preventing login locally by being a simple printf("This account is currently not available"); program, and not a REPL.



                So, to answer your question: There is only one type of shell, and that is executable. If you can run a program, it's a shell.






                share|improve this answer
























                  up vote
                  4
                  down vote













                  This is a question where the answer is complicated. What most people call a "shell" is a Read-Eval-Print Loop and therefore, even a python interpreter is a shell, provided you are running python interactively. However, this would mean that nologin is not a real shell! So what is a shell?



                  Technically speaking, any program can be used as a shell. In fact, here are a few pictures of me using unusual shells:



                  1. Python shell as the login shell


                  2. Nano as a shell (though you can't distinguish between it being run normally, since it's fullscreen)

                  3. Cat running as a shell


                  4. Top running as a shell (even though you, again, can't see it being a shell)

                  5. And a hello world program!

                  However, this isn't what you'd expect to be running as shells. Usually, you'll want to be running one of the shells in /etc/shells. For example, mine contains:



                  # /etc/shells: valid login shells
                  /bin/sh
                  /bin/bash
                  /bin/rbash
                  /bin/dash
                  /usr/bin/tmux
                  /usr/bin/screen


                  and none of the shells I mentioned previously! So why do they run?



                  To put it simply, they do, but only locally. If you look at the shells manpage with man shells, you will discover that /etc/shells is mostly used by programs such as FTP daemons. This is why you don't see the nologin shell in /etc/shells: It prevents login to FTP and other non-login daemons by not being there, while preventing login locally by being a simple printf("This account is currently not available"); program, and not a REPL.



                  So, to answer your question: There is only one type of shell, and that is executable. If you can run a program, it's a shell.






                  share|improve this answer






















                    up vote
                    4
                    down vote










                    up vote
                    4
                    down vote









                    This is a question where the answer is complicated. What most people call a "shell" is a Read-Eval-Print Loop and therefore, even a python interpreter is a shell, provided you are running python interactively. However, this would mean that nologin is not a real shell! So what is a shell?



                    Technically speaking, any program can be used as a shell. In fact, here are a few pictures of me using unusual shells:



                    1. Python shell as the login shell


                    2. Nano as a shell (though you can't distinguish between it being run normally, since it's fullscreen)

                    3. Cat running as a shell


                    4. Top running as a shell (even though you, again, can't see it being a shell)

                    5. And a hello world program!

                    However, this isn't what you'd expect to be running as shells. Usually, you'll want to be running one of the shells in /etc/shells. For example, mine contains:



                    # /etc/shells: valid login shells
                    /bin/sh
                    /bin/bash
                    /bin/rbash
                    /bin/dash
                    /usr/bin/tmux
                    /usr/bin/screen


                    and none of the shells I mentioned previously! So why do they run?



                    To put it simply, they do, but only locally. If you look at the shells manpage with man shells, you will discover that /etc/shells is mostly used by programs such as FTP daemons. This is why you don't see the nologin shell in /etc/shells: It prevents login to FTP and other non-login daemons by not being there, while preventing login locally by being a simple printf("This account is currently not available"); program, and not a REPL.



                    So, to answer your question: There is only one type of shell, and that is executable. If you can run a program, it's a shell.






                    share|improve this answer












                    This is a question where the answer is complicated. What most people call a "shell" is a Read-Eval-Print Loop and therefore, even a python interpreter is a shell, provided you are running python interactively. However, this would mean that nologin is not a real shell! So what is a shell?



                    Technically speaking, any program can be used as a shell. In fact, here are a few pictures of me using unusual shells:



                    1. Python shell as the login shell


                    2. Nano as a shell (though you can't distinguish between it being run normally, since it's fullscreen)

                    3. Cat running as a shell


                    4. Top running as a shell (even though you, again, can't see it being a shell)

                    5. And a hello world program!

                    However, this isn't what you'd expect to be running as shells. Usually, you'll want to be running one of the shells in /etc/shells. For example, mine contains:



                    # /etc/shells: valid login shells
                    /bin/sh
                    /bin/bash
                    /bin/rbash
                    /bin/dash
                    /usr/bin/tmux
                    /usr/bin/screen


                    and none of the shells I mentioned previously! So why do they run?



                    To put it simply, they do, but only locally. If you look at the shells manpage with man shells, you will discover that /etc/shells is mostly used by programs such as FTP daemons. This is why you don't see the nologin shell in /etc/shells: It prevents login to FTP and other non-login daemons by not being there, while preventing login locally by being a simple printf("This account is currently not available"); program, and not a REPL.



                    So, to answer your question: There is only one type of shell, and that is executable. If you can run a program, it's a shell.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Sep 9 at 13:37









                    KryÅ¡tof PíÅ¡těk

                    411




                    411




















                        up vote
                        2
                        down vote













                        To make the point in the other answers more explicit: There's nothing special about "a shell". This




                        I understand that nologin, false, and true are actually shells and they are used to prevent users from logging in




                        is not true: false and true just happened to be programs that were already available on early Unix systems (and they were used in other contexts). What happened is that there was the situation where there were user accounts that didn't correspond to an actual user. So the question was what to put into the "shell" field in /etc/passwd. Because you can put in any program there, the early sysadmins thought it was a cute hack (and practical) to just use /bin/false. Later sysadmins thought it was a bit too much of a hack, and wrote nologin (now that they had more harddisk space to use) to better document this intention.



                        So: You can use any program as the program that gets spawned when a user logs in. Many programs won't make sense (e.g. when they'd need commandline arguments). Some others will. If you get bored, you can write your own. You don't have to put in any special sauce to make it "a shell".






                        share|improve this answer
























                          up vote
                          2
                          down vote













                          To make the point in the other answers more explicit: There's nothing special about "a shell". This




                          I understand that nologin, false, and true are actually shells and they are used to prevent users from logging in




                          is not true: false and true just happened to be programs that were already available on early Unix systems (and they were used in other contexts). What happened is that there was the situation where there were user accounts that didn't correspond to an actual user. So the question was what to put into the "shell" field in /etc/passwd. Because you can put in any program there, the early sysadmins thought it was a cute hack (and practical) to just use /bin/false. Later sysadmins thought it was a bit too much of a hack, and wrote nologin (now that they had more harddisk space to use) to better document this intention.



                          So: You can use any program as the program that gets spawned when a user logs in. Many programs won't make sense (e.g. when they'd need commandline arguments). Some others will. If you get bored, you can write your own. You don't have to put in any special sauce to make it "a shell".






                          share|improve this answer






















                            up vote
                            2
                            down vote










                            up vote
                            2
                            down vote









                            To make the point in the other answers more explicit: There's nothing special about "a shell". This




                            I understand that nologin, false, and true are actually shells and they are used to prevent users from logging in




                            is not true: false and true just happened to be programs that were already available on early Unix systems (and they were used in other contexts). What happened is that there was the situation where there were user accounts that didn't correspond to an actual user. So the question was what to put into the "shell" field in /etc/passwd. Because you can put in any program there, the early sysadmins thought it was a cute hack (and practical) to just use /bin/false. Later sysadmins thought it was a bit too much of a hack, and wrote nologin (now that they had more harddisk space to use) to better document this intention.



                            So: You can use any program as the program that gets spawned when a user logs in. Many programs won't make sense (e.g. when they'd need commandline arguments). Some others will. If you get bored, you can write your own. You don't have to put in any special sauce to make it "a shell".






                            share|improve this answer












                            To make the point in the other answers more explicit: There's nothing special about "a shell". This




                            I understand that nologin, false, and true are actually shells and they are used to prevent users from logging in




                            is not true: false and true just happened to be programs that were already available on early Unix systems (and they were used in other contexts). What happened is that there was the situation where there were user accounts that didn't correspond to an actual user. So the question was what to put into the "shell" field in /etc/passwd. Because you can put in any program there, the early sysadmins thought it was a cute hack (and practical) to just use /bin/false. Later sysadmins thought it was a bit too much of a hack, and wrote nologin (now that they had more harddisk space to use) to better document this intention.



                            So: You can use any program as the program that gets spawned when a user logs in. Many programs won't make sense (e.g. when they'd need commandline arguments). Some others will. If you get bored, you can write your own. You don't have to put in any special sauce to make it "a shell".







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Sep 9 at 11:12









                            dirkt

                            14.6k2932




                            14.6k2932




















                                up vote
                                0
                                down vote













                                Anything you want.



                                A shell is just a TTY application. so anything you can run on a TTY can be a shell.



                                One example of an unconventional shell would be a bulletin board service:
                                user logs in via ssh or telnet and gets a BBs instead of a command-line






                                share|improve this answer






















                                • … or uucico or sync or …
                                  – JdeBP
                                  Sep 9 at 11:18










                                • @Jasen: off-topic answer. Moreover, a POSIX shell is a fundamental system software.
                                  – Fólkvangr
                                  Sep 9 at 11:41






                                • 1




                                  The idea that this is off-topic is bizarre, and it says the same as all of the other answers do. The only point of confusion is that the answer is echoing the usage of the question, where "shell" is used to mean the class of program that is named in one field of a user record in the account database.
                                  – JdeBP
                                  Sep 9 at 20:57










                                • @Folkvangr entries starting /usr/bin/ and /usr/local/bin/ can be used in the shell field (you may need to update the list in /etc/shells to enable these) anything in those directories is not fundamental.
                                  – Jasen
                                  Sep 10 at 4:42










                                • Your answer is incorrect, partial and confusing since you do not determine the context allowing to develop or justifying your point. How do I know that you are talking about /etc/passwd, /etc/shells or that you are declaring that a shell is essentially a TTY application?
                                  – Fólkvangr
                                  Sep 10 at 7:18















                                up vote
                                0
                                down vote













                                Anything you want.



                                A shell is just a TTY application. so anything you can run on a TTY can be a shell.



                                One example of an unconventional shell would be a bulletin board service:
                                user logs in via ssh or telnet and gets a BBs instead of a command-line






                                share|improve this answer






















                                • … or uucico or sync or …
                                  – JdeBP
                                  Sep 9 at 11:18










                                • @Jasen: off-topic answer. Moreover, a POSIX shell is a fundamental system software.
                                  – Fólkvangr
                                  Sep 9 at 11:41






                                • 1




                                  The idea that this is off-topic is bizarre, and it says the same as all of the other answers do. The only point of confusion is that the answer is echoing the usage of the question, where "shell" is used to mean the class of program that is named in one field of a user record in the account database.
                                  – JdeBP
                                  Sep 9 at 20:57










                                • @Folkvangr entries starting /usr/bin/ and /usr/local/bin/ can be used in the shell field (you may need to update the list in /etc/shells to enable these) anything in those directories is not fundamental.
                                  – Jasen
                                  Sep 10 at 4:42










                                • Your answer is incorrect, partial and confusing since you do not determine the context allowing to develop or justifying your point. How do I know that you are talking about /etc/passwd, /etc/shells or that you are declaring that a shell is essentially a TTY application?
                                  – Fólkvangr
                                  Sep 10 at 7:18













                                up vote
                                0
                                down vote










                                up vote
                                0
                                down vote









                                Anything you want.



                                A shell is just a TTY application. so anything you can run on a TTY can be a shell.



                                One example of an unconventional shell would be a bulletin board service:
                                user logs in via ssh or telnet and gets a BBs instead of a command-line






                                share|improve this answer














                                Anything you want.



                                A shell is just a TTY application. so anything you can run on a TTY can be a shell.



                                One example of an unconventional shell would be a bulletin board service:
                                user logs in via ssh or telnet and gets a BBs instead of a command-line







                                share|improve this answer














                                share|improve this answer



                                share|improve this answer








                                edited Sep 10 at 22:27

























                                answered Sep 9 at 11:03









                                Jasen

                                2,054713




                                2,054713











                                • … or uucico or sync or …
                                  – JdeBP
                                  Sep 9 at 11:18










                                • @Jasen: off-topic answer. Moreover, a POSIX shell is a fundamental system software.
                                  – Fólkvangr
                                  Sep 9 at 11:41






                                • 1




                                  The idea that this is off-topic is bizarre, and it says the same as all of the other answers do. The only point of confusion is that the answer is echoing the usage of the question, where "shell" is used to mean the class of program that is named in one field of a user record in the account database.
                                  – JdeBP
                                  Sep 9 at 20:57










                                • @Folkvangr entries starting /usr/bin/ and /usr/local/bin/ can be used in the shell field (you may need to update the list in /etc/shells to enable these) anything in those directories is not fundamental.
                                  – Jasen
                                  Sep 10 at 4:42










                                • Your answer is incorrect, partial and confusing since you do not determine the context allowing to develop or justifying your point. How do I know that you are talking about /etc/passwd, /etc/shells or that you are declaring that a shell is essentially a TTY application?
                                  – Fólkvangr
                                  Sep 10 at 7:18

















                                • … or uucico or sync or …
                                  – JdeBP
                                  Sep 9 at 11:18










                                • @Jasen: off-topic answer. Moreover, a POSIX shell is a fundamental system software.
                                  – Fólkvangr
                                  Sep 9 at 11:41






                                • 1




                                  The idea that this is off-topic is bizarre, and it says the same as all of the other answers do. The only point of confusion is that the answer is echoing the usage of the question, where "shell" is used to mean the class of program that is named in one field of a user record in the account database.
                                  – JdeBP
                                  Sep 9 at 20:57










                                • @Folkvangr entries starting /usr/bin/ and /usr/local/bin/ can be used in the shell field (you may need to update the list in /etc/shells to enable these) anything in those directories is not fundamental.
                                  – Jasen
                                  Sep 10 at 4:42










                                • Your answer is incorrect, partial and confusing since you do not determine the context allowing to develop or justifying your point. How do I know that you are talking about /etc/passwd, /etc/shells or that you are declaring that a shell is essentially a TTY application?
                                  – Fólkvangr
                                  Sep 10 at 7:18
















                                … or uucico or sync or …
                                – JdeBP
                                Sep 9 at 11:18




                                … or uucico or sync or …
                                – JdeBP
                                Sep 9 at 11:18












                                @Jasen: off-topic answer. Moreover, a POSIX shell is a fundamental system software.
                                – Fólkvangr
                                Sep 9 at 11:41




                                @Jasen: off-topic answer. Moreover, a POSIX shell is a fundamental system software.
                                – Fólkvangr
                                Sep 9 at 11:41




                                1




                                1




                                The idea that this is off-topic is bizarre, and it says the same as all of the other answers do. The only point of confusion is that the answer is echoing the usage of the question, where "shell" is used to mean the class of program that is named in one field of a user record in the account database.
                                – JdeBP
                                Sep 9 at 20:57




                                The idea that this is off-topic is bizarre, and it says the same as all of the other answers do. The only point of confusion is that the answer is echoing the usage of the question, where "shell" is used to mean the class of program that is named in one field of a user record in the account database.
                                – JdeBP
                                Sep 9 at 20:57












                                @Folkvangr entries starting /usr/bin/ and /usr/local/bin/ can be used in the shell field (you may need to update the list in /etc/shells to enable these) anything in those directories is not fundamental.
                                – Jasen
                                Sep 10 at 4:42




                                @Folkvangr entries starting /usr/bin/ and /usr/local/bin/ can be used in the shell field (you may need to update the list in /etc/shells to enable these) anything in those directories is not fundamental.
                                – Jasen
                                Sep 10 at 4:42












                                Your answer is incorrect, partial and confusing since you do not determine the context allowing to develop or justifying your point. How do I know that you are talking about /etc/passwd, /etc/shells or that you are declaring that a shell is essentially a TTY application?
                                – Fólkvangr
                                Sep 10 at 7:18





                                Your answer is incorrect, partial and confusing since you do not determine the context allowing to develop or justifying your point. How do I know that you are talking about /etc/passwd, /etc/shells or that you are declaring that a shell is essentially a TTY application?
                                – Fólkvangr
                                Sep 10 at 7:18



                                這個網誌中的熱門文章

                                How to combine Bézier curves to a surface?

                                Carbon dioxide

                                Why am i infinitely getting the same tweet with the Twitter Search API?