I'm Sham
一个在通往码农道路上走走停停的行政文员

Linux常用命令备忘

Debian & Ubuntu 查看CPU温度 lm-sensors

#安装软件
sudo apt-get install lm-sensors -y

#配置(可选)
sensors-detect

#查看温度命令
sensors

Debian & Ubuntu 查看某个软件进程

#查看所有的
ps aux

#查看某一个,比如frp
ps -elf | grep frp

#查看最高的几个,能看到各项资源占用情况
top

Debian & Ubuntu 安装和卸载软件

#安装某个软件(从软件库)
sudo apt-get install xxx

#安装硬盘里的
sudo dpkg -i xxx.deb

#卸载软件
sudp apt-get remove xxx

Debian & Ubuntu 挂在U盘硬盘

#查看U盘硬盘信息
sudo fdisk -l

#卸载硬盘(假设硬盘是/dev/sda1)
sudo umount /dev/sda1

#挂载硬盘
# -o uid=www,gid=www 表示以用户www,用户组www来挂载
# iocharset=utf8能用来避免中文乱码
# -t vfat 是以vfat的格式来挂载
sudo mount -o uid=www,gid=www iocharset=utf8 -t vfat /dev/sda1 /www/Upan

Debian & Ubuntu & 树莓派安装pppoe

#先安装pppoe
sudo apt-get install pppoe pppoeconf

#然后配置
pppoeconf

#最后查看是否成功
ifconfig

树莓派更换源

#修改以下2个文件里的地址(网址供参考),操作前记得备份
sudo nano  /etc/apt/sources.list
sudo nano /etc/apt/sources.list.d/raspi.list

#参考国内源
http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/
http://mirrors.aliyun.com/raspbian/raspbian/
https://mirrors.tuna.tsinghua.edu.cn/raspberrypi/

更换pip源

#安装时临时使用
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple xxx软件名

#永久更换(这里以树莓派为例),将这两个文件里的源网址更换成国内源就行
sudo nano /root/.pip/pip.conf
sudo nano /etc/pip.conf

#国内源参考
https://mirrors.aliyun.com/pypi/simple/
http://pypi.douban.com/simple/
https://pypi.tuna.tsinghua.edu.cn/simple/
赞(0) 赏杯咖啡!
未经允许不得转载:Sham@双目瞿 » Linux常用命令备忘

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

如果你觉得文章好,请赏1杯速溶咖啡给Sham吧!

微信扫一扫打赏