如何重新创建 .bashrc

huangapple go评论55阅读模式
英文:

How to re-create .bashrc

问题

I accidently deleted .bashrc from my user. Is there any way to create it again.

我不小心删除了我的用户中的 .bashrc 文件。有没有办法重新创建它?

I used command touch .bashrc to create the file again and also given the required data inside the file. But it is not working.

我使用命令 touch .bashrc 重新创建了文件,并且在文件内添加了所需的数据。但它不起作用。

Can anyone tell me how to recreate the file?

有人能告诉我如何重新创建这个文件吗?

英文:

I accidently deleted .bashrc from my user. Is there any way to create it again.

I used command touch .bashrc to create the file again and also given the required data inside the file. But it is not working.

Can anyone tell me how to recreate the file?

答案1

得分: 3

在RHEL中,您可以在/etc/skel中找到家目录的默认内容:

$ ls -la /etc/skel
total 24
drwxr-xr-x.   3 root root   78 Mar 29 17:07 .
drwxr-xr-x. 149 root root 8192 May 25 11:24 ..
-rw-r--r--.   1 root root   18 Jun 20  2022 .bash_logout
-rw-r--r--.   1 root root  141 Jun 20  2022 .bash_profile
-rw-r--r--.   1 root root  376 Jun 20  2022 .bashrc
drwxr-xr-x.   4 root root   39 Mar 29 17:07 .mozilla
英文:

In RHEL, you can find the default content of a home directory in /etc/skel:

$ ls -la /etc/skel
total 24
drwxr-xr-x.   3 root root   78 Mar 29 17:07 .
drwxr-xr-x. 149 root root 8192 May 25 11:24 ..
-rw-r--r--.   1 root root   18 Jun 20  2022 .bash_logout
-rw-r--r--.   1 root root  141 Jun 20  2022 .bash_profile
-rw-r--r--.   1 root root  376 Jun 20  2022 .bashrc
drwxr-xr-x.   4 root root   39 Mar 29 17:07 .mozilla

huangapple
  • 本文由 发表于 2023年5月26日 17:09:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/76339322.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定