Question

I am on another computer, but I want to scp some files over to my macbook pro. The command for this is:

scp -rp filename.txt user@path

How do I find the address/path of my mac? I tried

ifconfig

on my mac and a lot of descriptions popped up, including several numbers that could be IP addresses. However, I don't know how to interpret the data. Help?

Était-ce utile?

La solution

The output of ifconfig gives the different interfaces your computer has. You might find several ip addresses, depending if you have both wired and/or wireless connections and/or other types. The interfaces are listed like enX (en1, en2.. etc) depending on the number of interfaces you got. For ipv4 address, look at the "inet:" part, usually something like 192.x.x.x., 83.x.x.x or something similar.

As an example,

ifconfig | grep inet

will result in the different inet(ipv4) addresses in your computer, for the different interfaces.

Autres conseils

You were on the right track. When you use ifconfig on the far left you'll see a column with items like hi,lo,eth0,eth1,etc... These are the interfaces. Usually, the main interface is going to be eth0. Next to this should be a line which begins with inet addr:. The IP after that is your IP address. Use that to connect to that PC.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top