由于自己学习linux系统一直都是基于centos系统下学习的。忽略了Ubuntu系统的存在。为此,在本博客中,截取到2022年6月25日之前的博文,所讲的linux系统都是基于centos的。而在2022年6月25日是之后的博文,我会注明是哪个系统。
Ubuntu系统,基本上跟centos的操作大同小异,只是一些命令有所不一样而已。
#Ubuntu
#sudo的意思就是以root的权限执行
su - #切换到root权限
sudo apt update #更新源
sudo apt install build-essential #安装gcc、c++编译器
sudo apt-get install net-tools #安装net-tools,也就是说安装好后,可以利用ifconfig来查看ip地址
#centos
yum install #安装命令
如果需要用ftp远程连接,则使用 (ftp, 非sftp over ssh),具体操作如下
sudo su #以root权限运行
ufw disable #关闭防火墙
sudo apt-get install vsftpd #安装vsftpd
sudo vim /etc/vsftpd.conf
#把 local_enable=YES write_enable=YES 前面的井号删了(也就是把这两个打开)