Linux is really easy to use

Compared with Windows, Linux’s efficiency is really great. In order to prevent myself from forgetting the commands I used and to avoid having to look for them everywhere in a hurry, I wrote down a note. I’ve been busy with other things lately~ November is coming to an end so quickly, so I’ll post this in a timely manner.

Vim configuration

The following command can align the VIM editor and highlight the input cursor

sudo echo set nu ts=2 et sw=2 cuc autoindent > ~/.vimrc

Change root password

sudo passwd root  #之后根据提示输入2次密码即可

Network configuration

#显示网卡
nmcli con show  
#修改网卡IP地址
nmcli con mod "Wire connection 1" ipv4.method manual ipv4.address 172.25.250.100/24 ipv4.gateway 172.25.250.254 ipv4.dns 172.25.250.250 autoconnect yes 

#禁用和启用网卡
nmcli con down "Wire connection 1"
nmcli con up "Wire connection 1"

#修改 允许root 访问 ssh
sudo echo "PermitRootLogin yes" >> /etc/ssh/sshd_config.d/01-permitrootlogin

sudo systemd restart sshd 

Process management

#查找名为qcloud 的进程
ps aux | grep qcloud

#根据进程ID 强制杀死进程
kill -9 1588