前言
开发使用 Linux 强烈建议使用 Ubuntu 不建议使用 CentOS
下载软件的时候推荐使用 deb 和 snap 格式的文件
应用中心
https://ubuntukylin.com/applications/
基本环境
安装显卡驱动
Edge 插件无法下载
sudo gedit /etc/hosts
修改为如下
131.253.33.219 edge.microsoft.com
131.253.33.219 msedgeextensions.sf.tlu.dl.delivery.mp.microsoft.com
199.232.96.133 raw.githubusercontent.com
缩放调整
cd /usr/share/glib-2.0/schemas
sudo gedit org.gnome.desktop.interface.gschema.xml
找到text-scaling-factor, 修改default的数值为1.25
sudo gedit com.ubuntu.user-interface.gschema.xml
找到text-scaling-factor, 修改default的数值为1.25
sudo glib-compile-schemas /usr/share/glib-2.0/schemas/
reboot
常用软件
微信
有两个版本可用
原生版 功能比较少。
https://ubuntukylin.com/applications/106-cn.html
Wine版 功能比较全 截图不能用。
目前两个版本都不能截图和上传图片。
Wine版
推荐使用Wine版的。
下载Wine环境包:
Wine环境包下载地址:
http://archive.ubuntukylin.com/software/pool/partner/ukylin-wine_70.6.3.25_amd64.deb
下载微信(wine)包:
微信(wine)包下载地址:
http://archive.ubuntukylin.com/software/pool/partner/ukylin-wechat_3.0.0_amd64.deb
终端输入:
chmod 777 *.deb
sudo apt-get install -f -y ./ukylin-wine_70.6.3.25_amd64.deb
sudo apt-get install -f -y ./ukylin-wechat_3.0.0_amd64.deb
修改DPI(修改前要推出微信)
WINEPREFIX=~/.ukylin-wine/wechat /usr/bin/ukylin-wine winecfg
显示=>屏幕分辨率=>设置为120
中文乱码
下载字体
链接: https://pan.baidu.com/s/1XsYVhD-YMnvBpatwtLgLGA 提取码: psvm
解压该压缩包
unzip Fonts.zip
把Fonts文件夹内所有字体复制到wine的映射目录内
mkdir -p ~/.ukylin-wine/wechat/drive_c/windows/Fonts/
cp ~/下载/Fonts/* ~/.ukylin-wine/wechat/drive_c/windows/Fonts/
cd ~/.ukylin-wine/wechat/drive_c/windows/Fonts/
查看是否不再乱码
WINEPREFIX=~/.ukylin-wine/wechat /usr/bin/ukylin-wine winecfg
Typora
https://typoraio.cn/#linux
主题
http://theme.typora.io/theme/Vue/
禁止升级
sudo apt-mark hold typora
图片插件
图片上传插件 picGo
PicGo-Core
我这里上传方式选择 app 的始终不行就使用PicGo-Core的方式了
安装PicGo-core
PicGo的图形界面在ubuntu上对typora支持不是很好,因此使用 PicGo-core,采用命令行方式自动上传图片。
安装nodejs
ubuntu默认不带有nodejs,若已经安装请运行命令node -v检查版本是否大于8.0
若版本小于8.0请先执行以下命令卸载旧版本nodejs
sudo apt-get remove nodejs
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install nodejs
测试是否安装成功,执行下面命令,显示版本号就表示安装成功
node -v
测试npm是否可以使用
npm -v
若出现版本号表示可用 跳过下面这条命令;若提示命令不存在则执行下列命令
sudo apt install npm
再次测试。
npm config set registry https://registry.npmmirror.com
npm config list
安装PicGo-core
sudo npm install picgo@1.4.26 -g
修改配置文件
vi ~/.picgo/config.json
以下是配置 其中qiniu中改成自己的配置。
{
"picBed": {
"current": "qiniu",
"uploader": "qiniu",
"qiniu": {
"accessKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"area": "z1",
"bucket": "psvmc",
"options": "!github",
"path": "blog/",
"secretKey": "yyyyyyyyyyyyyyyyyyyyyyyy",
"url": "http://image.psvmc.cn"
}
},
"settings": {
"privacyEnsure": true,
"showUpdateTip": true,
"autoRename": true,
"autoStart": true
}
}
配置
插入图片时改为上传图片
勾选图中3个附加选项
上传服务设定改为custom Command
命令改为/usr/bin/node /usr/local/bin/picgo upload
PicGo-App
图片上传插件 picGo
官网:
https://molunerfinn.com/PicGo/
https://github.com/Molunerfinn/picgo/releases
镜像地址
https://mirrors.sdu.edu.cn/github-release/Molunerfinn_PicGo/v2.3.1/
下载后进行安装
sudo snap install picgo_2.3.1_amd64.snap --dangerous
报错
error: cannot find signatures with metadata for snap
不进行签名验证
--dangerous
百度云
https://pan.baidu.com/download
WPS
卸载
sudo apt remove wps-officesud
解决在 ubuntu 22.04 上安装 wps 打不开问题
添加权限即可
sudo chmod 0777 -R /opt/kingsoft/wps-office
开发环境
远程连接
使用自带软件Remmina
使用rdesktop
安装
sudo apt install rdesktop
使用举例
rdesktop 110.110.110.110:3389 -g 1024x768 -a 16 -u administrator -p '123456'
共享磁盘和剪贴板
`rdesktop -0 110.110.110.110:3389 -g 1024x768 -a 16 -u administrator -p '123456' -r clipboard:PRIMARYCLIPBOARD -r disk:share_home=/hom`e
注意
密码中有特殊符号要使用单引号。
常用使用参数
-f 全屏
-g 桌面大小
-a 16 16位色深
-u 用户名
-p 密码
-r clipboard 表示允许在远程主机和本机之间共享剪切板,可以复制粘贴
-r clipboard:PRIMARYCLIPBOARD 共享剪贴板,连接到window7
-r disk:share=/home 共享/home目录
ctrl+alt+enter 退出全屏
连接失败,提示如下:
Connecting to server using NLA…
Core(warning): Certificate received from server is NOT trusted by this system, an exception has been added by the user to trust this specific certificate.
TLS Session info: (TLS1.2)-(RSA)-(AES-256-GCM)
Failed to initialize NLA, do you have correct Kerberos TGT initialized ?
Failed to connect using NLA, trying with SSL
Failed to connect, CredSSP required by server (check if server has disabled old TLS versions, if yes use -V option).
解决方法是:
先通过其他方式远程连接服务器。
右键我的电脑–>属性–>远程设置–>远程
取消勾选 仅允许运行使用网络界别身份验证的远程桌面的计算机连接(建议)(N)
SSH登录脚本
sudo vi /usr/local/bin/login.exp
内容
#!/usr/bin/expect
set timeout 30
spawn ssh -p [lindex $argv 2] [lindex $argv 0]@[lindex $argv 1]
expect {
"(yes/no)?"
{send "yes\n";exp_continue}
"password:"
{send "[lindex $argv 3]\n"}
}
interact
把配置文件命名为login.exp 放在/usr/local/bin目录下
设置访问权限
sudo chmod 777 /usr/local/bin/login.exp
连接服务器
login.exp root 192.168.7.101 22 zhangjian
报错:
当 Linux 服务器没有安装 expect 时,执行 expect 文件时,就会报如下错误:
/usr/bin/expect: No such file or directory
解决方法比较简单,安装 expect 命令即可。
在服务器上执行如下命令
sudo apt-get install expect
JDK
官方下载JDK 网址
链接: https://pan.baidu.com/s/1COHU0dKhBb9x_wWxIwuibw 提取码: psvm
安装
sudo tar -zxvf jdk-8u341-linux-x64.tar.gz -C /usr/local
安装后的路径为/usr/local/jdk1.8.0_341
为空的话要配置java-home 否则无法配置Tomcat为服务
cd /etc/profile.d/
创建配置文件
sudo vi /etc/profile.d/jdk.sh
加入:
export JAVA_HOME=/usr/local/jdk1.8.0_341
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
配置立即生效
sudo source /etc/profile
查询java版本
java -version
查看java-home
echo $JAVA_HOME
GIT
sudo apt install git
配置
git config --global user.email "sevice@qlaitai.ltd"
git config --global user.name "bryanhsu"
客户端软件
https://www.syntevo.com/smartgit/download/
SmartGit
默认每次都会弹出弹窗
免费申请授权申请地址
https://www.syntevo.com/cn/smartgit/register-non-commercial/
这样选择,否则是付费的。
NodeJS
npm 镜像
npm config set registry https://registry.npmmirror.com
npm config list
IDEA
下载
链接: https://pan.baidu.com/s/1tGZVIMn__Srlpy7dxm-J_g 提取码: psvm
解压
tar -zxvf ideaIU-2021.3.3.tar.gz -C /opt/
设置图标
gedit /usr/share/applications/idea.desktop
内容如下
[Desktop Entry]
Name=idea
Name[zh_CN]=IDEA
Name[zh_TW]=IDEA
Exec=/opt/idea-IU-213.7172.25/bin/idea.sh
Terminal=false
Type=Application
Icon=/opt/idea-IU-213.7172.25/bin/idea.png
Comment=IDEA
Comment[zh_CN]=IDEA
Comment[zh_TW]=IDEA
Categories=Application;
无法输入中文
在IDEA打开页面
点击 help => Edit Custom VM options
在末行添加:
-Drecreate.x11.input.method=true
博客更新
npm install hexo-cli -g
生成上传
hexo g
hexo d
VSCode
下载地址
https://code.visualstudio.com/Download
无法同步配置
中访问
vscode.dev
查看可用 IP 修改 hosts
sudo gedit /etc/hosts
修改为如下
13.107.213.51 vscode.dev
卸载
卸载的三种方式
apt list
apt remove weixin*
snap list
snap remove weixin*
卸载libreoffice
首先卸载libreoffice表格。
sudo apt remove libreoffice-calc
3.接着我们卸载libreoffice绘图。
sudo apt remove libreoffice-draw
然后是卸载幻灯片工具。
sudo apt remove libreoffice-impress
接着卸载word文档工具。
sudo apt remove libreoffice-writer
最后我们把其它libreoffice相关的都卸载了。
sudo apt remove libreoffice*
清除libreoffice配置文件。
sudo apt purge libreoffice*
sudo apt autoremove
现在我们发现ubuntu桌面上的libreoffice软件图标都没有了,卸载工作完成。
评论(0)