英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论