After a Kernal update when I open terminal it show my computer name and not my user name
Hello and welcome,
Could you give me the output of this command in terminal ?
cat ~/.bashrc | grep "PS1"
cat ~/.bashrc | grep "PS1"
PS1='${debian_chroot:+($debian_chroot)}[\033[01;32m]\u@\h[\033[00m]:[\033[01;34m]\w[\033[00m]$ '
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$ '
PS1="[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a]$PS1"
OK,
Edit this file
nano ~/.bashrc
go under
case "$TERM" in
xterm*|rxvt*)
and edit this line
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
and change it to
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u: \w\a\]$PS1"
save your file Ctrl+X , then Y , then Enter
close atll terminal windows and open a new terminal
Thanks, I see the line to edit (must remove the \h:) but I don't know how to remove those characters. If I backspace or delete it does nothing.
I will follow in a couple of hours as i must leave home for a bit
again, thanks for helping
dan
you can also edit the file like this
gnome-text-editor ~/.bashrc
Before I try this, as I am new to Terminal, is there any issue that when I open terminal it shows the computer name instead of user name.
Is that just as safe? It still requires me to put in password
thanks
dan
sure it's safe or I wouldn't say you to do it, and you will not need password
look at my prompt I changed it many times
Do you need sudo nano?
no it's a user file
Sorry if I confused you. I am not saying that your instructions are not safe, I meant can I just leave the terminal always showing computer name and not user names.
thanks
dan
yes you can it's the orginal config provided by gnome terminal
I used the gnome editor and changed the line and reopened the terminal and it shows the line was changed but now what. How do I change to another user
I also found that the computer name is not in the sudoers file.
so i cannot do simple commands like sudo apt update
thanks, dan
I tried to follow a youtube vid what to do if name is not in the sudoers file, but it did not fix it
why you want to change to another user?!
I really don't understand what you want to do.
It is your computer or not ?
I have 3 computers that I installed Zorin on. This one will not let me install updates because when it asks for a password and I enter it, it says user not in sudoers file. I thought this started afer the kernal update (another story) and I was not sure if having the computer name in terminal was new or had always been there. Again, new user that knew nothing about terminal yet.
If I can't fix this, I have 2 steps to try, restore a earlier timeshift and see, or reinstall on this computer.
I do appreciate your help and probably have other questions as I get more into Linux
thanks
dan
