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=
export https_proxy=

Snapd 代理设置

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 代理设置


git config --global http.proxy socks5://
git config --global https.proxy socks5://
git config --global http.proxy
git config --global https.proxy
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.

If you are using zsh, your system may not read in the necessary PATHs that are set in /etc/profile.d/ 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/'

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?


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



Flameshot-Powerful yet simple to use screenshot software

Developer website:



发送评论 编辑评论