Linux 使用小记
1 安装IDEA
mkdir -p /home/app/idea
tar -zxvf ideaIU-2022.3.3.tar.gz -C /home/app/idea
cd /usr/local/IDEA/idea-IU-223.8836.41/bin
sh ./idea.sh
1.1 配置 IDEA 快捷方式
sudo gedit /usr/share/applications/idea.desktop
1.2 写入下面的内容
[Desktop Entry]
Name=IntelliJ IDEA
Comment=IntelliJ IDEA
Exec=/home/xuhe/app/idea/idea-IU-231.8109.175/bin/idea.sh
Icon=/home/xuhe/app/idea/idea-IU-231.8109.175/bin/idea.png
Terminal=false
Type=Application
Categories=Developer;
2 卸载应用:
dpkg --list
sudo apt-get remove <package_name> && sudo apt-get autoremove
3 youtubedr使用:
3.1 列表:
youtubedr info https://www.youtube.com/watch?v=rFejpH_tAHM
3.2 下载:
3.2.1 简单下载:
youtubedr download https://www.youtube.com/watch?v=rFejpH_tAHM
3.2.2 指定文件地址下载:
youtubedr download -d ~/下载 -o ex.mp4 https://www.youtube.com/watch?v=rFejpH_tAHM
3.2.3 特定质量下载:
youtubedr download -q medium https://www.youtube.com/watch?v=rFejpH_tAHM
youtubedr download -q hd1080 https://www.youtube.com/watch?v=rFejpH_tAHM
3.2.4 特定标签下载:
youtubedr download -q 18 https://www.youtube.com/watch?v=rFejpH_tAHM
3.2.5 常用:
youtubedr download -q 18 -d ~/下载 https://www.youtube.com/watch?v=rFejpH_tAHM
4 lux使用:
4.1 代理:
export HTTPS_PROXY=“socks5://127.0.0.1:7890”
4.2 列表:
lux -i “https://www.bilibili.com/video/BV1ZJ411h713”
4.3 下载:
4.3.1 简单下载:
lux “https://www.youtube.com/watch?v=QJXPS0gQ6Eg”
4.3.2 从文件中读取下载链接:
lux -F /path/to/links.txt
4.3.3 特定质量下载:
lux -f 64-7 https://www.bilibili.com/video/BV1ZJ411h713
4.3.4 指定保存路径:
lux -o ~/视频/ https://www.bilibili.com/video/BV1ZJ411h713
4.3.5 常用:
lux -f 32-12 -o ~/视频/ https://www.bilibili.com/video/BV1ZJ411h713
5 git配置ssh
git config --global user.name “xxx”
git config --global user.email xxx@email.com
ssh-keygen -t rsa -C “xuhe93@126.com”
cat id_rsa.pub
6 安装java
wget -p <保存路径> https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.deb
dpkg -i jdk-21_linux-x64_bin.deb
java -version
6.1 设置环境变量
export JAVA_HOME=/usr/lib/jvm/jdk-21-oracle-x64
7 安装docker
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable”
apt-cache policy docker-ce
sudo apt install docker-ce
sudo systemctl status docker
sudo usermod -aG docker ${USER}
su - ${USER}
groups
7.1 docker 使用
docker search ubuntu
docker pull ubuntu
docker images
docker run -it ubuntu
docker ps
docker ps -a
docker ps -l
docker start ${CONTAINER ID}
docker stop ${CONTAINER NAMES}
docker rm ${CONTAINER NAMES}
docker images
8 安装python3
8.1 安装
sudo apt install python3.10
8.2 卸载
sudo apt-get remove python3.10
sudo apt-get autoremove --purge python3.10
9 Conda
9.1 安装
wget https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh
bash Anaconda3-2022.10-Linux-x86_64.sh
vim ~/.bashrc
在末尾添加:
export PATH="~/anaconda3/bin":$PATH