linux home路径下.bashrc文件被误删怎么办?

我在.bashrc文件里加软件路径的时候,不知道怎么回事把里面的所有路径都删了,能恢复吗

第1个回答  2020-08-11
这个是好多的地方都有,你可以复制一份过来,你可以用etc/skel/..... 里面找出来.profile文件~ 放在当前用户目录。
如果你找不到。那么内容是以下这样子的。。复制粘贴吧 兄dei~

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网