日期: 2021 年 10 月 6 日
《孙子兵法》笔记
debian系Linux常用命令
列出已安装的软件包:
apt list --installed
列出所有可更新的软件清单:
sudo apt update
升级所有已安装的软件包:
sudo apt upgrade
列出可更新的软件包及版本信息:
apt list --upgradeable
升级软件包,升级前先删除需要更新软件包:
sudo apt full-upgrade
安装指定的软件命令:
sudo apt install <package_name>
安装多个指定的软件包:
sudo apt install <package_1> <package_2> <package_3>
如果我们想安装一个软件包,但如果软件包已经存在,则不要升级它,可以使用 –no-upgrade 选项:
sudo apt install <package_name> --no-upgrade
安装 mplayer 如果存在则不要升级:
sudo apt install mplayer --no-upgrade
如果只想升级,不要安装可以使用 –only-upgrade 参数:
sudo apt install <package_name> --only-upgrade
只升级 mplayer,如果不存在就不要安装它:
sudo apt install mplayer --only-upgrade
如果需要设置指定版本,语法格式如下(package_name 为包名,version_number 为版本号):
sudo apt install <package_name>=<version_number>
更新指定的软件命令:
sudo apt update <package_name>
显示软件包具体信息,例如:版本号,安装大小,依赖关系等等:
sudo apt show <package_name>
卸载一个已安装的软件包(保留配置文件):
sudo apt remove <package_name>
例如卸载libreoffice办公软件:
sudo apt remove --purge libreoffice*
卸载一个已安装的软件包(删除配置文件):
apt remove --purge packagename
清理不再使用的依赖和库文件:
sudo apt autoremove
移除软件包及配置文件:
sudo apt purge <package_name>
查找软件包命令:
sudo apt search <keyword>
列出所有已安装的包:
apt list --installed
列出所有已安装的包的版本信息:
apt list --all-versions
安装本地软件包:
sudo dpkg -i 软件包全名加后缀
修复依赖关系:
sudo apt install -f
安装OBS直播软件:
sudo apt update
sudo apt install ffmpeg
sudo apt install obs-studio
安装WINE环境:
sudo apt install wine // 安装WINE
sudo apt-get install winetricks // 安装额外工具
winecfg // Windows 版本选择Windows 10
wine /home/zhong/Downloads/WeChatSetup.exe
安装fcitx5中文输入法框架:
sudo apt install fcitx5
sudo apt install fcitx5-chinese-addons
sudo apt install fcitx5-frontend-gtk4 fcitx5-frontend-gtk3 fcitx5-frontend-gtk2
sudo apt install fcitx5-frontend-qt5
安装五笔输入法:
sudo apt install fcitx fcitx-table-wubi
安装中文google拼音输入法:
# sudo apt install fcitx-googlepinyin
# reboot // 重启系统
安装五笔拼音输入法:
sudo apt install fcitx-table-wbpy
sudo apt install fcitx-table-wbpy
安装延长 Linux 笔记本电池寿命的高级电源管理工具:
sudo apt install tlp tlp-rdw
安装VLC Media Player(最受欢迎的开源视频播放器)播放器:
sudo apt install vlc
安装smplayer(可播放所有的音频和视频格式)全能播放器:
sudo apt install smplayer
安装火焰截图:
sudo apt install flameshot
安装桌面便利贴:
sudo apt install xpad
安装audacity音频编辑器:
sudo apt install audacity
安装keepass2密码生成器和凭证存储工具:
sudo apt install keepass2
安装免费开源FTP软件:
sudo apt install filezilla
安装Gufw Firewall防火墙:
sudo apt install gufw
安装shotcut视频编辑软件:
sudo apt install shotcut
安装kazam录屏软件:
sudo apt install kazam
安装krita图片编辑软件:
sudo apt install krita
sudo apt install krita-l10n //安装中文语言包
安装gimp图片编辑软件:
sudo apt install gimp
安装kdenlive视频编辑软件:
sudo apt install kdenlive
安装bluefish网页编辑器:
sudo apt install bluefish
安装chromium开源浏览器:
sudo apt install chromium-browser
安装chromium B.S.U飞机通关游戏:
sudo apt install chromium-bsu
安装LINUX下最好的下载管理器:
sudo apt install uget
安装thunderbird邮件客户端:
sudo apt install thunderbird
安装clementine音乐播放器:
sudo apt install clementine
安装qbittorrent种子文件和磁力链接下载工具:
sudo apt install qbittorrent
安装audacious音乐播放器(推荐):
sudo apt install audacious
安装kompare比较文件或文件夹内容的差异:
sudo apt install kompare
安装qmmp音乐播放器:
sudo apt install qmmp
安装shutter截图软件:
sudo apt install shutter
安装GDebi软件包安装程序:
sudo apt install gdebi -y
安装新立得软件包管理器:
sudo apt install synaptic
安装speedtest-cli测速软件:
sudo apt install speedtest-cli
安装脑图软件:
sudo apt install freeplane
安装Remmina远程桌面客户端:
sudo apt install remmina
更换镜像源,vim /etc/apt/sources.list,添加行:
# See https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/
deb http://http.kali.org/kali kali-rolling main contrib non-free
# Additional line for source packages
# deb-src http://http.kali.org/kali kali-rolling main contrib non-free
将系统升级到新版本:
sudo apt dist-upgrade
WIN下利用PYTHON下载网页视频
上一篇文章讲了KALI系统下利用PYTHON下载网页视频,但实际情况下,绝大多数人不像我一样用LINUX系统,而用的WIN系统,下面讲一下如何在WIN下利用PYTHON库——you-get下载网页视频。
一、安装PYTHON,这个简单,到PYTHON官网下载安装包,直接安装就可以了,这个不多讲;
二、安装you-get库。快捷键WIN+R,打开“运行”,输入CMD,打开命令符界面,输入代码:pip3 install you-get,回车,等了半天出现安装错误;
C:\Users\hero>pip3 install you-get
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000201BBD29EA0>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/you-get/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/you-get/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000201BBD2A3E0>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/you-get/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000201BBD2A5C0>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/you-get/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000201BBD2A7A0>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/you-get/
ERROR: Could not find a version that satisfies the requirement you-get (from versions: none)
ERROR: No matching distribution found for you-get
三、解决思路有两个:1.安装翻墙软件(本人用的是蓝灯),然后再输入安装代码安装;2.更换国内的安装源(本人选阿里的源),这里推荐用第二种方法(你懂的),输入代码:pip3 install you-get -i http://mirrors.aliyun.com/pypi/simple/ –trusted-host mirrors.aliyun.com,回车,you-get安装成功;
C:\Users\hero>pip3 install you-get -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Collecting you-get
Downloading http://mirrors.aliyun.com/pypi/packages/a9/58/382ba8588318b1be53b2de34c136d81c04d2c997bd24c5e5c000d72f74f4/you_get-0.4.1545-py3-none-any.whl (228 kB)
|████████████████████████████████| 228 kB ...
Installing collected packages: you-get
Successfully installed you-get-0.4.1545
WARNING: You are using pip version 21.2.3; however, version 21.2.4 is available.
You should consider upgrading via the 'C:\Users\hero\AppData\Local\Programs\Python\Python310\python.exe -m pip install --upgrade pip' command.
四、输入代码: you-get https://www.bilibili.com/video/BV1u44y1x7yq?spm_id_from=333.6.0.0 (即:you-get 视频网址),回车,稍后视频会下载到 C:\Users\hero 文件夹中。
C:\Users\hero>you-get https://www.bilibili.com/video/BV1u44y1x7yq?spm_id_from=333.6.0.0
site: Bilibili
title: 水友邮件诉苦毕业两年人生无望 周姐在线痛斥句句真实伤害
stream:
- format: flv
container: flv
quality: 高清 1080P
size: 33.7 MiB (35285590 bytes)
# download-with: you-get --format=flv [URL]
Downloading 水友邮件诉苦毕业两年人生无望 周姐在线痛斥句句真实伤害.flv ...
100% ( 33.7/ 33.7MB) ├████████████████████████████████████████┤[1/1] 0 B/s
Downloading 水友邮件诉苦毕业两年人生无望 周姐在线痛斥句句真实伤害.cmt.xml ...