Score:0

Ubuntu 20.04 gets stuck in the login loop

nu flag

I can open the desktop using startx command in other tty

I have tried a lot of methods:

  • chown the Xauthority file
  • chmod the /tmp
  • check the /etc/environment file

but all these methods do not work.


When I type su root command, it will give the following output:

Screenshot of error

bash: groups: command not found
Command 'lesspipe' is available in the following places
 * /bin/lesspipe
 * /usr/bin/lesspipe
The command could not be located because '/bin:/usr/bin' is not included in the PATH environment variable.
lesspipe: command not found
Command 'dircolors' is available in the following places
 * /bin/dircolors
 * /usr/bin/dircolors
The command could not be located because '/usr/bin:/bin' is not included in the PATH environment variable.
dircolors: command not found
Command 'dirname' is available in the following places
 * /bin/dirname
 * /usr/bin/dirname
The command could not be located because '/usr/bin:/bin' is not included in the PATH environment variable.
dirname: command not found
Command 'dirname' is available in the following places
 * /bin/dirname
 * /usr/bin/dirname
The command could not be located because '/bin:/usr/bin' is not included in the PATH environment variable.
dirname: command not found
Command 'dirname' is available in the following places
 * /bin/dirname
 * /usr/bin/dirname
The command could not be located because '/bin:/usr/bin' is not included in the PATH environment variable.
dirname: command not found
Command 'dirname' is available in the following places
 * /bin/dirname
 * /usr/bin/dirname
The command could not be located because '/bin:/usr/bin' is not included in the PATH environment variable.
dirname: command not found

when I type groups, lesspipe, dirname, these commands still work.

Greenonline avatar
us flag
You should roll back to edit #4. Errors are better posted as text, because a search shot can not be searched for text.
vn flag
This is the key: "The command could not be located because '/bin:/usr/bin' is not included in the PATH environment variable." You've somehow deleted or overwritten the default PATH variable. To get back, first `export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin` and then try to find where you've overridden it (could be in .bashrc or /etc/environment or /etc/profile, etc.)
vn flag
It's possible you've done more damage than that, but that will get you back to being able to make calls more easily, at least.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.