Fedora软件安装
添加第三方源: RPM Fusion
sudo dnf install \
https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
编程:
- vim:
sudo dnf install vim
cat >~.vimrc<<EOF
filetype on
set ts=4
set number
set autoindent
map <F5> :w<cr>:r!python3 %<cr>
map <C-j> <C-W>j
map <C-k> <C-W>k
map <C-h> <C-W>h
map <C-l> <C-W>l
EOF
说明一下:
:vs 竖向分屏
:sp 横向分屏
Ctrl+j,k,h,l 跟vim使用习惯一样,切换屏幕
- VsCode(for all lang):
if [ ! -f "/etc/yum.repos.d/vscode.repo" ]; then
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo sh -c \'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo\'
fi
sudo dnf install code
-
LiteIDE(just for golang):
我下的版本是:liteidex37.4.linux64-qt5.5.1-system.tar.gz
。下载后,放在合适的位置。然后添加图标:
if [ ! -f ~/.local/share/applications/liteide.desktop ] ; then
cat >~/.local/share/applications/liteide.desktop<<EOF
[Desktop Entry]
Name=LiteIDE
Exec=[Path to liteide (此行需要替换)]
Icon=[Path to liteide png (此行需要替换)]
Terminal=false
Type=Application
X-Desktop-File-Install-Version=0.24
EOF
fi
-
PyCharm:
官网下载 或 如下操作:
sudo bash -c \'cat << EOF > /etc/yum.repos.d/_copr_phracek-PyCharm.repo:
[phrase-PyCharm]
name=Copr repo for PyCharm owned by phracek
baseurl=https://copr-be.cloud.fedoraproject.org/results/phracek/PyCharm/fedora-$releasever-$basearch/
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://copr-be.cloud.fedoraproject.org/results/phracek/PyCharm/pubkey.gpg
enabled=1
enabled_metadata=1
EOF\'
sudo dnf install pycharm-community
不知道为何 fedora35下,pycharm欢迎界面没有打开选项了呢?
- Jupyter notebook 和 Ipython:
sudo dnf install jupyter-notebook
sudo dnf install ipython
Chrome:
if [ ! -f "/etc/yum.repos.d/google-chrome.repo" ]; then
cat >./google-chrome.repo<<EOF
[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/rpm/stable/x86_64
enable=1
gpgcheck=1
gpgkey=https://dl.google.com/linux/linux_signing_key.pub
EOF
sudo mv -v ./google-chrome.repo /etc/yum.repos.d/
fi
sudo dnf -y install google-chrome-stable #--nogpg
音视频:
- smplayer: 视频播放
- byzanz-record: 录制屏幕
- flowblade: 视频剪辑(b站上有教程,难得!还没学)
- rhythmbox: 自带听歌软件
- easytag: 修改歌曲标签
- mencoder 很好地完成了我的简单任务。所以有了这个脚本 cut-video.sh 来剪视频(它只接受正确的输入):
#!/bin/bash
# 提取视频
if [ $# -ne 4 ]
then echo "USage: `basename $0` start_time(hh:mm:ss) end_time(hh:mm:ss) input_file output_file" ; exit 1
fi
start_time=$1
hour_s=`echo $start_time | cut -f 1 -d :`
min_s=`echo $start_time | cut -f 2 -d :`
sec_s=`echo $start_time | cut -f 3 -d :`
let start_sec="$((10#$hour_s*60*60)) + $((10#$min_s*60)) + $((10#$sec_s))"
end_time=$2
hour_e=`echo $end_time | cut -f 1 -d :`
min_e=`echo $end_time | cut -f 2 -d :`
sec_e=`echo $end_time | cut -f 3 -d :`
let end_sec="$((10#$hour_e*60*60)) + $((10#$min_e*60)) + $((10#$sec_e))"
let duration_time=$end_sec-$start_sec
let duration_h=$duration_time/3600
let duration_m=($duration_time-3600*$duration_h)/60
let duration_s=$duration_time-3600*$duration_h-60*$duration_m
duration=`echo $duration_h:$duration_m:$duration_s`
input_file=$3
output_file=$4
mencoder -ss $start_time -endpos $duration \
-oac pcm -ovc copy \
$input_file -o $output_file
将倒数第二行,改为:-ovc frameno -oac mp3lame -lameopts cbr:br=320 -of rawaudio \
另存为cut-audio.sh, 就可以只提取音频。
虚拟机:
- virtualbox: 我的win7是运行在vbox上的。(注意:如果只能装32位系统,请到bios设置虚拟化。)
游戏:
- Battle for Wesnoth(韦诺之战):这个玩得多点,棋盘类的战斗游戏。
sudo dnf install wesnoth
- 力: 第一人称射击死亡竞技类 3D 电子游戏。
sudo dnf install xonotic
- Steam: 这个不是游戏,是游戏平台,CS、文明、Dota等许多好游戏都有的玩。
sudo dnf install steam
文明最低要求配置:(Linux下:N卡ok,A卡貌似新一点的可以。)
需要 64 位处理器和操作系统
操作系统: Ubuntu 16.04 (64bit)
处理器: Intel Core i3 530 or AMD A8-3870
内存: 6 GB RAM
显卡: 1 GB VRAM Minimum - NVIDIA GeForce 650
存储空间: 需要 15 GB 可用空间
附注事项: IMPORTANT NOTICE: Some Intel i3 Processors may require an additional 2 GB Swap Partition.
IMPORTANT NOTICE: ATI and INTEL chipsets are NOT supported to run Civilization VI LINUX.
文明花了我59块,居然玩不了,现已解决,如下:
>LD_PRELOAD=/usr/lib64/libfreetype.so.6 QT_AUTO_SCREEN_SCALE_FACTOR=0 %command%
>Right click the game in your library, go to properties, click "Set Launch Options...", and enter the above line.
直播:
讲到游戏,怎能少了直播。
- OBS: 直播软件,可以在b站直播,我试过了。[转]Linux下直播环境搭建OBS+bilibili-live-helper