今天装了台ubuntu server ,日常基本用rhel /centos  ,ubuntu 的设置不太了解,遇到几个问题总结如下:

1.系统安装完,切换到root 配置网络

sudo -s   

vim /etc/network/interfaces


1240

2.修改主机名

vim  /etc/hostname


1240

3.防火墙设置  systemctl   {start|stop|restart|status}   ufw.service   或者service  ufw  {start|stop|restart|status}


1240

4.apparmor (类似于selinux),可以按传统服务的方式开启,停止,重启等,如下图:


1240


5.ssh problem


ubuntu not install openssh-server  ,so , it can't  connect by xshell


solution:

sudo apt-get openssh-server

service ssh start

ps -ef |grep ssh