记一些使用Linux的坑

1

给navicat创建快捷方式的时候图标死活不出来,最后解决办法是把icon参数放在exec参数前面

[Desktop Entry]
Encoding=UTF-8
Name=Navicat
Comment=The Smarter Way to manage dadabase
Icon=/opt/navicat120_premium_cs_x64/navicat.png
Exec=/bin/sh "/opt/navicat120_premium_cs_x64/start_navicat"
Categories=Application;Database;MySQL;navicat
Version=1.0
Type=Application
Terminal=0

2

当我在snap store也就是ubuntu软件中心下载pycharm和VScode时,遇到了如下报错:
snapd returned status code 409: Conflict
上网查找之后,才知道这个错误码409表示的是:由于和被请求的资源的当前状态之间存在冲突,请求无法完成。即并发执行时返回的错误码。
由于之前ubuntu软件中心无响应被我强制退出了,因此的确很有可能与之前进行到一半的安装冲突。于是使用snap changes查看最近的snap更改。
果然看见之前的snap进程依旧在“Doing”,因此根据对应的序号使用 sudo snap abort 进程编号 终止进程。

3

设置linux和windows系统时间统一 https://blog.csdn.net/gatieme/article/details/51883981

4

看mysql状态是遇到一个小问题

sudo netstat -apt |grep mysql

提示没有此命令,注意最后一行提示因为没有安装net-tools的缘故
执行:

sudo apt-get install net-tools

再次输入命令查询即可
mysql节点处于LISTEN状态表示启动成功

5

在Ubuntu 20.04上使用Systemback https://zhuanlan.zhihu.com/p/90022299
但是如果你是ubuntu18.04以后的系统,按照教程的步骤执行,一定会遇到这个问题:
The repository 'http://ppa.launchpad.net/nemh/systemback/ubuntu bionic Release' does not have a Release file.
这是由于Systemback的作者在2016年停止了开发,因此Ubuntu 18.04和18.10不在支持列表中。
针对ubuntu18.04以后的系统,我们只需要依次执行以下命令:

1.如果你已经添加过PPA,请先删除(否则忽略此步):

    sudo add-apt-repository --remove ppa:nemh/systemback

2.重新添加PPA:

    sudo add-apt-repository "deb http://ppa.launchpad.net/nemh/systemback/ubuntu xenial main"

3.更新包列表并安装Systemback:

    sudo apt update
    sudo apt install systemback

安装完成后就可以从应用程序菜单启动Systemback
Systemback创建还原节点 https://ubuntuqa.com/article/10012.html
https://blog.csdn.net/qq_41248872/article/details/86659074
https://blog.csdn.net/qq_41248872/article/details/86659373

6

解决systemback 无法生成超过4G的iso的问题 https://community.bwbot.org/topic/194/解决systemback-无法生成超过4g的iso的问题

7

解决linux下sudo更改文件权限报错xxxis not in the sudoers file. This incident will be reported. https://blog.csdn.net/sinat_36118270/article/details/62899093

8

centos7结束进程
查询结束某个程序,比如有多个scrapyd 启动,找到正确需要停止的
ps -ef | grep scrapyd # 根据进程名查看进程信息
netstat -nap | grep 1095 # 根据进程id查看进程占用端口
netstat -tunlp | grep 8080 # 根据端口查看对应进程,查看占用8080端口的进程id
kill -9 1095 # 根据进程id杀死进程,杀死进程id为1095的进程

posted @ 2022-03-27 17:59  听风逐浪  阅读(115)  评论(0编辑  收藏  举报