title |
---|
ubuntu系统学到的知识 |
cat gedit
code filename
sudo gedit /etc/profile
source ~/.bashrc
ctrl+h
mvn compile
import -> maven -> exiting maven projext -> 选择编译过的maven项目 -> **变成ss
ps -A || ps -A | grep redis
kill -9 5689
ll > 1.txt
cd.>1.txt
find / -name fileName
ps -aux | grep nginx || ps -ef | grep nginx
xz -d 要解压的文件 然后: tar -xvf 刚刚解压出来的tar包
echo -e "deb [by-hash=force] http://mirrors.aliyun.com/deepin unstable main contrib non-free \ndeb-src http://mirrors.aliyun.com/deepin unstable main contrib non-free" | sudo tee /etc/apt/sources.list
sudo chown -R $USER /usr
对本地的ssh进行重置
vi /Users/yaozu/.ssh/known_hosts // 把ip以及ip后面的部分给删掉
安装node 毕竟我是前端嘛,node肯定是少不了,最简单、最省事的方式是先安装nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
source ~/.bashrc
nvm install v10.13.0
// 列出所有的sshd
ps aux | grep sshd
// 查看当前正在使用的sshd
who
// 删除多余的sshid
kill id //(注意: ps 列出的第一个不要删除)
修改*/usr*的权限之后,sudo命令就会报错: sudo: error in /etc/sudo.conf, line 0 while loading plugin 'sudoers_policy'
解决方式:
chmod 644 /usr/lib/sudo/sudoers.so
chown -R root /usr/lib/sudo
vim /etc/hosts
在localhost后面添加 iZ2zecsdy8flu603bmdg1bZ
nvm alias default stable
- lsof -i:端口号
- netstat -tunlp|grep 端口号
- find . -name '*.xml' -delete
- find . -name "*.xml" -exec rm -rf {} ;
https://blog.csdn.net/qq_38737992/article/details/81090373
sudo apt-get update
sudo apt-get install mysql-server
<!-- 初始化配置 -->
sudo mysql_secure_installation
<!-- 检查mysql的运行状态 -->
systemctl status mysql.service
登录的时候: mysql -u root -p密码
wget -qO- https://deb.nodesource.com/setup_12.x | sudo -E bash -
apt-get update
apt-get install nodejs
apt-get install npm
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/partial/*
https://blog.csdn.net/qq_33788609/article/details/90691574
- 对当前用户有效
vi ~/.bashrc
export PATH=$PATH:/usr/local/node/bin
- 所有账户均有效
sudo vi /etc/profile
export PATH=$PATH:/usr/local/node/bin
https://blog.csdn.net/qiqzhang/article/details/87862556
<!-- 卸载旧版 -->
sudo apt-get remove golang-go
sudo apt-get remove --auto-remove golang-go
<!-- 安装 -->
wget https://studygolang.com/dl/golang/go1.12.5.linux-amd64.tar.gz
tar -zxvf go1.12.5.linux-amd64.tar.gz
sudo mv go /usr/local/
<!-- 配置 -->
vim ~/.bashrc
export GOROOT=/usr/local/go # 安装目录。
export GOPATH=$HOME/go # 工作环境
export GOBIN=$GOPATH/bin # 可执行文件存放
export PATH=$GOPATH:$GOBIN:$GOROOT/bin:$PATH # 添加PATH路径
source ~/.bashrc
<!-- 测试是否安装成功 -->
go version
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/partial/*