0

When I connect with the Terminal on Mac, I see:

root@example:~#

How can I change the value of example ?

Is it the hostname ?

Thanks.

F__M
  • 111
  • 6
  • Usually what follows after the @ is the hostname, but it's defined in $PS1 so it could be just a [*hardcoded*] string. Use `echo $PS1` to see what makes up your PS1 prompt value. (`info bash` can provide more details) – guiverc Sep 27 '19 at 11:58
  • @guiverc, it returns me `\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$`. What it means? – F__M Sep 27 '19 at 11:58
  • 3
    Possible duplicate of [How can I change my command line (bash) prompt?](https://askubuntu.com/questions/397344/) – karel Sep 27 '19 at 12:01
  • search for PROMPTING section (or look at https://manpages.ubuntu.com/manpages/bionic/en/man1/bash.1.html) – guiverc Sep 27 '19 at 12:05

1 Answers1

0

No, it is not the hostname but the name of the computer/pc which you have assigned and to change it

1) Go to settings

2) Then go to details (last option)

3) You can see the version of your ubuntu as well as the configuration of your system. There is an option called Device name (which must be set to example) change the 'example' with whatever name you want to choose then close the settings tab and open a terminal to check if the name has been changed successfully.

Linux Geek
  • 208
  • 1
  • 9