How to save and run a Java file in PuTTY?

后端 未结 2 1637
离开以前
离开以前 2021-01-15 23:01

I m a complete newbie on AWS(Amazon Web Services) so this might be a basic question.

I created an EC2 instance on AWS. I have a windows machine so I\'m usin

2条回答
  •  北海茫月
    2021-01-15 23:20

    See Saumil..

    When you login then the directory in which you are landed is your users home directory.. Like in your case "ec2-user"..

    So if you do "vi filename" without changing directory then the file is created in the users home directory "/home/ec2-user" .. N that is represented by ~.. Which represents the current users home directory..

    N then if you logout and login again then the file stays there.. Nothing happens to that file as long as you manually delete it..

    N by the above snapshot I can see that after login you are changing your user to root.. But if you could see after doing sudo you still remain in the same directory. N "~" changes to "ec2-user" because the root users home directory is different..

提交回复
热议问题