本文介绍了如何恢复默认〜/.bashrc ubuntu的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我弄乱了〜/.bashrc文件,并试图恢复它.

I messed up my ~/.bashrc file and am trying to restore it.

我尝试这样做:

cp ~/.bashrc ~/.bashrc_bak
cp /etc/skel/.bashrc ~/
source .bashrc

但我收到此错误:

cp: /etc/skel/.bashrc: No such file or directory

我查看了/etc ,但是那里没有 skel 文件.

I looked in /etc but there's no skel file there.

我是一个完整的初学者.感谢您的帮助.

I'm a complete beginner. Thanks for your help.

推荐答案

在终端中键入以下内容,

Type the following in your terminal,

/bin/cp /etc/skel/.bashrc ~/

它将用一个新的替换您损坏的〜/.bashrc .之后,您需要提供〜/.bashrc 的源代码,以便立即进行更改,并在终端中写入

It will replace your corrupt ~/.bashrc with a fresh one. After that you need to source the ~/.bashrc so that the change take place immediately, write in terminal,

source ~/.bashrc

或者如果这样不起作用,您可以关闭终端,然后再次打开它.

or if that does not work you can close the terminal and open it again.

这篇关于如何恢复默认〜/.bashrc ubuntu的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 10:51