What directory is '~' when I type 'cd ~'?

前端 未结 11 1830
伪装坚强ぢ
伪装坚强ぢ 2021-01-05 20:32

I\'m only new to using SSH, but when I log in I end up in the directory ~, which in general is the same directory when FTPing in. I can still go to /, but I don\'t know what

11条回答
  •  梦毁少年i
    2021-01-05 21:18

    ~ is an alias to the currently logged in users home directory. To find out where that really is, type pwd (stands for: Print Working Directory) right after logging in, which should give you the location relative to /. It's probably something like:

    /home/myusername
    

提交回复
热议问题