Linux 笔记

这篇Linux笔记用来记录一些Linux的设置、常用的软件、常见的问题

Proxy Settings

Terminal proxy

终端环境代理设置

export http_proxy=http://username:pass[email protected]:port
export ftp_proxy=http://username:[email protected]:port
export telnet_proxy=http://username:[email protected]:port
unset http_proxy
unset https_proxy
# example
export http_proxy=http://127.0.0.1:10809
export https_proxy=http://127.0.0.1:10809

Snapd 代理设置

Refer: https://snapcraft.io/docs/system-options
proxy.{http,https,ftp}
These options may be set to change the proxies to be used by the system when communicating with external sites that speak the respective protocols. Available since snapd 2.28.

sudo snap set system some.option="some value"
sudo snap get system some.option
sudo snap set system proxy.http="http://<proxy_addr>:<proxy_port>"
sudo snap set system proxy.https="http://<proxy_addr>:<proxy_port>"

Git 代理设置

可以修改~/.gitconfig

git config --global http.proxy socks5://127.0.0.1:10808
git config --global https.proxy socks5://127.0.0.1:10808
git config --global http.proxy http://127.0.0.1:10808
git config --global https.proxy http://127.0.0.1:10808
git config --global --unset http.proxy
git config --global --unset https.proxy

常见的问题

KDE Plasma

Snaps in application launcher

After installing snaps via discover or cli they do not appear in the application launcher. Flatpack apps work just fine. Any idea how to fix this? I’m using kde neon.

https://www.reddit.com/r/kde/comments/9pjos2/snaps_in_application_launcher/

If you are using zsh, your system may not read in the necessary PATHs that are set in /etc/profile.d/apps-bin-path.sh. As a result, KDE does not see the desktop files for the snaps.

To fix this, open your /etc/zsh/zprofile as root and add the following line:

emulate sh -c 'source /etc/profile'

This may also fix some other items related to the shell configuration. If all you want is to fix the paths, you can also just add the following line instead:

emulate sh -c 'source /etc/profile.d/apps-bin-path.sh'

Input method(Add Chinese)

Using ibus is not a good idea, because you need set up a lot for environment

sudo apt install fcitx-rime

Then logout the session, go settings-> fcitx-configuration add your language

How do I clear the DNS cache?

refer: https://askubuntu.com/questions/2219/how-do-i-clear-the-dns-cache/929478#929478

From Ubuntu 17.04 and onwards, systemd-resolve is used for DNS. You can flush systemd’s caches like so:

sudo systemd-resolve --flush-caches

Run php program in apache2

Sometimes we easily forget one php-extension libapache2-mod-php<version>
So if you got this problem — When opened your website, it showed php code instead of web interface


Useful software

ScreenShot

1.Flameshot

Flameshot-Powerful yet simple to use screenshot software

Developer website: https://github.com/lupoDharkael/flameshot

@这个可以和windows下的snipaste有一拼了

暂无评论

发送评论 编辑评论

上一篇
下一篇