[英]How to reset profile file on linux?
I have got an Amazon EC2 instance. 我有一个Amazon EC2实例。 I edited
etc/profile
, which has resulted in something terrible. 我编辑了
etc/profile
,结果很糟糕。 Now, I am not able to connect to the instance from Filezilla
. 现在,我无法从
Filezilla
连接到实例。 I am able to connect through putty
but the terminal opens with lot of text. 我可以通过
putty
进行连接,但是终端会打开很多文字。 I am definitely sure this is all because of something accidental changes that I created in profile
. 我绝对可以肯定,这都是由于我在
profile
创建的一些意外更改profile
。
Is there any way I can reset etc/profile
to its earlier version? 有什么办法可以将
etc/profile
重置为其早期版本?
There is no way to revert to the previous version if you dont have a backup of the file / snapshot of the instance ... 如果您没有实例文件/快照的备份,则无法恢复到以前的版本...
Depends if you already made change but if you want the default version, you can spin up a new ec2 instance of the same type, copy the /etc/profile
from the new instance into your current instance. 取决于您是否已经进行了更改,但是是否要使用默认版本,则可以启动相同类型的新ec2实例,将
/etc/profile
从新实例复制到当前实例中。 All this can be done within an hour so it will cost you only 1 hour of an additional ec2 instance. 所有这些都可以在一小时内完成,因此您只需花费一个额外的ec2实例一小时。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.