Linux笔记
创建zsh别名
shell
alias zsh vim ~/.zshrc alias pd="pnpm run dev"查看公网IP
shell
curl ifconfig.me更新包和源
shell
# Ubuntu
apt-get update
# CentOS、Red Hat
yum update
rpm -Uvh [args]先把服务器上所有的包和源都check和更新一遍,让服务器处在一个崭新的状态。
安装unzip解压缩工具
shell
yum install unzip -y安装vim
shell
yum install vim -yvim使用技巧
- 快速清空:打开文件,第一行输入:dG,即可从头到尾清空所有文本信息
- 显示行数:输入:set nu,即可显示行数
了解更多:vim使用教程
重启ssh
shell
# CentOS 6或以下
service ssh restart
# CentOS 7或以上
systemctl restart sshd启动服务
启动服务 systemctl start [name]
shell
systemctl start mariadb.service
systemctl start httpd.service