For doing this edit "~/.bashrc” file and add line entry with PS1 and set the custom name there.
For e.g. in below example we set the bash login prompt name to kube-operator
# .bashrc
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
PS1="kube-operator# "
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
kube-operator#
After making the change, logout of the current session and log back in.
Products to which Article Applies
All Linux Operating Systems
Search Keywords: custom name change changing bash prompt login logging prompts shell hostname host hostnames edit editing
Article Author: Tarun Boyella
No comments:
Post a Comment