Ubuntu常用指令

# 移动光标
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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值