Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: Terminal when open will not accept commands

  1. #1
    Join Date
    Dec 2020
    Beans
    9

    Terminal when open will not accept commands

    Terminal opens, but when I attempt to type for examle Sudo...... Nothing happens. I can't type anything. Using 20.10.
    Any thoughts?

  2. #2
    Join Date
    Feb 2008
    Location
    Texas
    Beans
    29,807
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Terminal when open will not accept commands

    Thread moved to New to Ubuntu for a more appropriate fit.

  3. #3
    Join Date
    Aug 2011
    Location
    52.5° N 6.4° E
    Beans
    6,806
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Terminal when open will not accept commands

    When you open the terminal, do you see a prompt? It should normally look like user@host:dir$, with a username, hostname and current working directory. Something like john@orion:~$.

    BTW, I never type Sudo (except just now). Occasionally I type sudo, one of my less used commands. The command line (like almost everything in Linux) is case-sensitive. And when sudo asks for your password, you won't see anything typed. That's normal, just type the password and hit enter.

  4. #4
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Terminal when open will not accept commands

    Code:
    $ sudo
    usage: sudo -h | -K | -k | -V
    usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
    usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user] [command]
    usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt] [-T timeout]
                [-u user] [VAR=value] [-i|-s] [<command>]
    usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt] [-T timeout]
                [-u user] file ...
    is what a userid in the sudo group should see. Let's see what a user not in the sudo group sees:
    Code:
    foo@regulus:~$ id
    uid=1001(foo) gid=1001(foo) groups=1001(foo)
    
    $ sudo 
    usage: sudo -h | -K | -k | -V
    usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
    usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user] [command]
    usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt] [-T timeout]
                [-u user] [VAR=value] [-i|-s] [<command>]
    usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt] [-T timeout]
                [-u user] file ...
    Same thing. Interesting. For some reason I would have thought that sudo wouldn't work for non-sudo group members.
    Code:
    $ ll /usr/bin/sudo
    -rwsr-xr-x 1 root root 166056 Jul 14 20:17 /usr/bin/sudo*
    I would have expected:
    Code:
    $ ll /usr/bin/sudo
    -rwsr-x--- 1 root sudo 166056 Jul 14 20:17 /usr/bin/sudo*

  5. #5
    Join Date
    Dec 2020
    Beans
    9

    Re: Terminal when open will not accept commands

    No prompt, All I get is James@james XPS 13 9360 -
    The dash is barely visible and is a light blue.

  6. #6
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Terminal when open will not accept commands

    Delete your ~/.bashrc and ~/.profile files. .... or move them somewhere else.
    Something is screwed in the new shell process. Those 2 files are part of the defaults.
    Or you could change the shell for your userid to some other valid shell, but that's really not for a beginner.

  7. #7
    Join Date
    Aug 2011
    Location
    52.5° N 6.4° E
    Beans
    6,806
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Terminal when open will not accept commands

    Quote Originally Posted by tajreed2 View Post
    No prompt, All I get is James@james XPS 13 9360 -
    The dash is barely visible and is a light blue.
    To me that sounds like a prompt. The dash would actually be a tilde. But it could be that your .bashrc or .profile or some file sourced from these was messed up. The shell may be in a deadlock, preventing it from accepting input, or echoing of input may be turned off, so you can still type, but don't see anything happen (like when typing a password).

    The defaults for .bashrc and .profile can be found in /etc/skel/.

  8. #8
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Terminal when open will not accept commands

    Er ... what is your hostname? hostnames should be lowercase, no funny characters, no spaces. There are many reasons.

  9. #9
    Join Date
    Dec 2020
    Beans
    9

    Re: Terminal when open will not accept commands

    I reinstalled 20.10 and the terminal worked. But later on it failed again. I still get the same response as shown above.
    I've been with Ubuntu since 2006 and this has me stumped.
    Now what?

  10. #10
    Join Date
    May 2008
    Beans
    3,946
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Terminal when open will not accept commands

    Quote Originally Posted by tajreed2 View Post
    No prompt, All I get is James@james XPS 13 9360 -
    The dash is barely visible and is a light blue.
    During the installation process, there is a warning about the computer name:-

    Computer name must not start or end with a hyphen

    How did you circumnavigate this when re-installing?

    Here is a suggestion:-

    Settings > About > Device name > Try and rename device without spaces and without a trailing hyphen

    Reboot and/or log out/log in.

    Any luck?

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •