User Tools

Site Tools


wiki:set_terminal_title_server_hostname

Set terminal title to server's hostname

Add to .bashrc file:

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac

Tested on

  • Debian 9, 10

See also

References

wiki/set_terminal_title_server_hostname.txt · Last modified: 2021/03/23 17:46 by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki