ubuntu16.0.4笔记本做服务器

现在有一台闲置的联想Y85p的笔记本,装ubuntu16.0.4LTS做个小主机

在安装好ubuntu系统之后,先把源换成阿里云(之前先换成清华源发现apt-get update 太慢)

参考Ubuntu 18.04换 清华源

将其中的 sources.list

deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse

sudo apt-get update
更新apt

sudo apt-get install openssh-server

安装 openssh-server

zhangsf@zhangsf:~$ sudo apt-get install openssh-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
openssh-server is already the newest version (1:7.2p2-4ubuntu2.8).
0 upgraded, 0 newly installed, 0 to remove and 215 not upgraded.

安装完成之后就查看当前主机的ip         Ubuntu18.04查看本机IP

zhangsf@zhangsf:~$ ifconfig
enp2s0    Link encap:Ethernet  HWaddr 20:1a:06:2b:f8:d1  
          inet addr:172.21.60.225  Bcast:172.21.60.255  Mask:255.255.255.0
          inet6 addr: 2001:da8:216:213c:8939:e2d2:a496:b9ac/64 Scope:Global
          inet6 addr: fe80::4af:576:e5b3:6e8b/64 Scope:Link
          inet6 addr: 2001:da8:216:213c:5815:3ff6:8f5d:37db/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:284724 errors:0 dropped:2 overruns:0 frame:0
          TX packets:194812 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:308212579 (308.2 MB)  TX bytes:20698374 (20.6 MB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:12642 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12642 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1511142 (1.5 MB)  TX bytes:1511142 (1.5 MB)

wlp3s0    Link encap:Ethernet  HWaddr a4:db:30:38:66:14  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

查找到 ip地址 172.21.60.225 之后

在同一个局域网中使用Mac笔记本上 通过ssh  172.21.60.225连接

你可能感兴趣的:(Linux相关)