首页 > 系统服务 > 详细

为Ubuntu新创建用户创建默认.bashrc并解决ubuntu20.04 命令行没有颜色的问题

时间:2021-07-19 22:49:06      阅读:36      评论:0      收藏:0      [点我收藏+]

首先,su – 到新创建的用户

拷贝默认的.bashrc过来

cp /etc/skel/.bashrc ~/

然后创建.profile文件

vi ~/.profile

粘贴下面的内容

# ~/.profile: executed by Bourne-compatible login shells.
 
if [ "$BASH" ]; then
  if [ -f ~/.bashrc ]; then
    . ~/.bashrc
  fi
fi

mesg n

想立即生效,执行下面命令

source ~/.profile

为Ubuntu新创建用户创建默认.bashrc并解决ubuntu20.04 命令行没有颜色的问题

原文:https://www.cnblogs.com/netflix/p/15031693.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!