M
M
MarcoBot2019-05-19 22:47:03
linux
MarcoBot, 2019-05-19 22:47:03

Ubuntu default shell?

I want to enter superuser mode, but it gives the following:

[email protected]:~$ sudo -s
sudo: tilix: команда не найдена

Checking the default shell:
[email protected]:~$ echo $SHELL
tilix

But I deleted tilix a long time ago with the command sudo apt purge tilix, I try to delete it again and it says
Package 'tilix' is not installed and therefore cannot be removed

I believe in general all available shells, tilix'a is not there:
[email protected]:~$ cat /etc/shells
# /etc/shells: valid login shells
/bin/sh
/bin/bash
/bin/rbash
/bin/dash
/usr/bin/fish

chsh also says bash is the default

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
MarcoBot, 2019-05-20
@MarcoBot

updated the root password through sudo passwd rootand everything returned to its place, now I can enter the superuser mode and the remote tilix does not hang as the default shell

K
k0taperkot, 2019-05-20
@k0taperkot

Are you running chsh as a non-root? Here it shows the shell for the user kirill.
Change the handles in /etc/passwd. You need root for this, of course. Switch to root via su, then if the specified shell is missing, sh should start. Then you can execute / bin / bash - to make it more convenient to work, and then change the default shell, even with chsh, even with your hands.

C
CityCat4, 2019-05-20
@CityCat4

/etc/shells is a list of shells allowed on this system, not necessarily existing ones. Shell - at least the root, at least the horse - is set in /etc/passwd, in the last field. To edit it, you need root rights.

% su -l
# vi /etc/passwd

(of course, the user who does this must have the right to execute the su command)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question