Linux 笔记

programming BobMaster 465次浏览 2536字 0个评论
文章目录[显示]
这篇文章在 2020年10月07日12:56:20 更新了哦~

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

Proxy Settings

Terminal proxy

终端环境代理设置

export http_proxy=http://username:[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 set 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 fcitx

sudo apt install fcitx-rime

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

Or using ibus

sudo apt install ibus-rime
ibus restart
ibus engine rime

Then go to language, add a new input source

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

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


文章版权归原作者所有 | 本站默认采用 CC-BY-NC-SA 4.0协议进行授权|
转载请务必注明原作者及本文原始地址:
https://blog.hibobmaster.com/linux-note/
喜欢 (0)
分享:-)
关于作者:
人生如音乐,欢乐且自由
发表我的评论(代码和日志请使用Pastebin或Gist)
取消评论

                       

去你妹的实名制!

  • 昵称 (必填)
  • 邮箱 (必填,不要邮件提醒可以随便写)
  • 网址 (选填)