日期: 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 ...