# 移动光标
Ctrl+a #光标移动到开始位置
Ctrl+e #光标移动到最末尾
Ctrl+k #删除此处至末尾的所有内容
Ctrl+u #删除此处至开始的所有内容
Ctrl+w #删除此处到左边的单词
Ctrl+b #向回移动光标
Ctrl+f #向前移动光标
Ctrl+l #相当于clear,即清屏
# 查看进程
ps -A
# 依赖问题,安装 aptitude,使用它安装软件
sudo apt-get install aptitude
sudo aptitude install python2.7
# 安装gdb和python-dbg
apt-get install gdb
aptitude install python3-dbg
# gdb调试python
# 命令大全http://ponder.work/2020/12/29/debug-python-with-gdb/
gdb /mnt/tangou/pytorch/bin/python3 35975
bt
py-bt
info auto-load
#杀死进程
kill pid
# 列出指定目录下的文件和子目录。
ls -alh /path/to/directory
# 改变当前工作目录。
cd /path/to/directory
# 创建新目录。
mkdir /path/to/newdirectory
# 创建新文件或更新现有文件的访问和修改时间。
touch /path/to/newfile
# 复制文件或目录。
cp /path/to/source /path/to/destination
# 移动或重命名文件或目录。
mv /path/to/source /path/to/destination
# 查看文件内容。
cat /path/to/file
# 查看文件的前几行或后几行。
head /path/to/file
tail /path/to/file
# 编辑文本文件。
vi /path/to/file
# 查找文件或目录。
find /path/to/directory -name "filename"
# 压缩或解压缩文件或目录。
tar -czvf archive.tar.gz /path/to/directory
tar -xzvf archive.tar.gz
# 显示系统内存和CPU使用情况。
top
# 显示磁盘空间使用情况。
df -h
# 显示网络连接情况。
netstat -an
# 安装软件包。
sudo apt-get install package
# 卸载软件包。
sudo apt-get remove package