MacOS和Ubuntu連接到同一個網絡
使用ping命令可以通信即可。
SSH
使用SSH可以很方便的在MacOS上訪問Ubuntu,不過只能用命令行操作,相當於連接了Ubuntu的終端。
1. Ubuntu上安裝SSH
sudo apt-get install openssh-server
2. Ubuntu上啟動SSH
sudo /etc/init.d/ssh start
3. MacOS上連接Ubuntu
打開Mac上的終端,輸入:ssh 用戶名@IP
VNC
使用VNC就可以在MacOS上訪問Ubuntu的界面了。
1. Ubuntu上安裝x11VNC
sudo apt-get install x11vnc
2. 密碼
命令:x11vnc -storepasswd
顯示並輸入密碼:
Enter VNC password: *********
Verify password: *********
Write password to /home/USERHOME/.vnc/passwd? [y]/n y
Password written to: /home/rahul/.vnc/passwd
3. 開啟服務
x11vnc -auth guess -once -loop -noxdamage -repeat -rfbauth /home/USERNAME/.vnc/passwd -rfbport 5900 -shared
把USRENAME改成自己的用戶名。
4. MacOS連接Ubuntu桌面
Mac上打開屏幕共享,輸入IP和密碼。