Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get url of current path in Terminal SSH

Tags:

git

terminal

ssh

I am having trouble using git on my own server. I am having trouble where I add the origin path (remote add) as I am entering the wrong url. By finding out the correct path to the .git repository on my server, I should be able to enter that into remote add and it should now find the git repository. So, what I would like to know is how can you get the current path of the folder you are browsing via SSH?

Thanks

like image 394
conspicatus Avatar asked Jun 30 '11 16:06

conspicatus


People also ask

How do I find my SSH path?

ssh directory. File paths for user's home directories can be found in /etc/passwd. The default directory and name for new keys is ~/. ssh/id_rsa, and this is where SSH will look for your keys.

How do I get the current path in Linux terminal?

To print the current working directory, we use the pwd command in the Linux system. pwd (print working directory) – The pwd command is used to display the name of the current working directory in the Linux system using the terminal.

How do I find the absolute path of a file?

The getAbsolutePath() method is a part of File class. This function returns the absolute pathname of the given file object. If the pathname of the file object is absolute then it simply returns the path of the current file object.


1 Answers

If the remote host is Unix-like, type pwd.

like image 158
Fred Foo Avatar answered Sep 19 '22 17:09

Fred Foo