Are there types of Unix shells? [closed]
Clash 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?
linux shell login
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.
add a comment |Â
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?
linux shell login
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 betweennologin
andfalse
. 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
add a comment |Â
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?
linux shell login
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
linux shell login
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 betweennologin
andfalse
. 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
add a comment |Â
1
Nope. Not a duplicate to the question you listed. The question you listed asks about the difference betweennologin
andfalse
. 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
add a comment |Â
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.
I understand thatnologin
,false
, andtrue
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
add a comment |Â
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".
add a comment |Â
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:
- Python shell as the login shell
Nano as a shell (though you can't distinguish between it being run normally, since it's fullscreen)- Cat running as a shell
Top running as a shell (even though you, again, can't see it being a shell)- 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.
add a comment |Â
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
, andtrue
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".
add a comment |Â
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
⦠oruucico
orsync
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
add a comment |Â
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.
I understand thatnologin
,false
, andtrue
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
add a comment |Â
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.
I understand thatnologin
,false
, andtrue
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
add a comment |Â
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.
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.
edited Sep 9 at 11:48
answered Sep 9 at 10:49
ctrl-alt-delor
9,15431948
9,15431948
I understand thatnologin
,false
, andtrue
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
add a comment |Â
I understand thatnologin
,false
, andtrue
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
add a comment |Â
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".
add a comment |Â
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".
add a comment |Â
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".
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".
answered Sep 9 at 11:05
l0b0
26.3k17106232
26.3k17106232
add a comment |Â
add a comment |Â
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:
- Python shell as the login shell
Nano as a shell (though you can't distinguish between it being run normally, since it's fullscreen)- Cat running as a shell
Top running as a shell (even though you, again, can't see it being a shell)- 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.
add a comment |Â
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:
- Python shell as the login shell
Nano as a shell (though you can't distinguish between it being run normally, since it's fullscreen)- Cat running as a shell
Top running as a shell (even though you, again, can't see it being a shell)- 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.
add a comment |Â
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:
- Python shell as the login shell
Nano as a shell (though you can't distinguish between it being run normally, since it's fullscreen)- Cat running as a shell
Top running as a shell (even though you, again, can't see it being a shell)- 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.
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:
- Python shell as the login shell
Nano as a shell (though you can't distinguish between it being run normally, since it's fullscreen)- Cat running as a shell
Top running as a shell (even though you, again, can't see it being a shell)- 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.
answered Sep 9 at 13:37
Kryà ¡tof PÃà ¡tÃÂk
411
411
add a comment |Â
add a comment |Â
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
, andtrue
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".
add a comment |Â
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
, andtrue
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".
add a comment |Â
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
, andtrue
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".
To make the point in the other answers more explicit: There's nothing special about "a shell". This
I understand that
nologin
,false
, andtrue
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".
answered Sep 9 at 11:12
dirkt
14.6k2932
14.6k2932
add a comment |Â
add a comment |Â
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
⦠oruucico
orsync
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
add a comment |Â
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
⦠oruucico
orsync
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
add a comment |Â
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
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
edited Sep 10 at 22:27
answered Sep 9 at 11:03
Jasen
2,054713
2,054713
⦠oruucico
orsync
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
add a comment |Â
⦠oruucico
orsync
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
add a comment |Â
1
Nope. Not a duplicate to the question you listed. The question you listed asks about the difference between
nologin
andfalse
. 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