Linux总结

切换镜像源

  • 登录阿里云官方镜像站 镜像站
  • 找到对应系统和对应版本,按照上面指导操作就好。 easy!

Bash

ohmyzsh

  • Install oh-my-zsh via curl
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  • Install oh-my-zsh via wget
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
  • Install oh-my-zsh via git
https://github.com/ohmyzsh/ohmyzsh
ohmyzsh/ohmyzsh/tree/master/tools/install.sh

ohmyzh 插件安装

zsh-autosuggestions
在.zshrc中添加plugins=(其他的插件 zsh-autosuggestions)

  • git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

zsh-syntax-highlighting
在.zshrc中添加plugins=(其他的插件 zsh-syntax-highlighting) 最好放在最后一个。

  • git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

vim配置

vim-plug
https://github.com/junegunn/vim-plug    #下载,解压,拷贝plug.vim就可以
cp plug.vim ~/.vim/autoload

vimrc

cd ~
mkdir  .vim
touch  .vim/vimrc
vim  .vim/vimrc

vimrc内容如下:

set nu                                                                                                                                        set mouse=
set norelativenumber
set cursorline
set wrap
set showcmd

set hlsearch
set incsearch
set ignorecase
set smartcase

set nocompatible
filetype plugin indent on

call plug#begin('~/.vim/plugged')
Plug 'vim-airline/vim-airline'
Plug 'connorholyday/vim-snazzy'
Plug 'vim-airline/vim-airline-themes'
call plug#end()

#airline
let g:airline_theme="luna"

1 dirb 安装参考

参考地址

2 curl

阮一峰的网络日志 参考链接

举例: hackthebox 注册码场景,要求用POST方式调用URL API时,除了用插件 hackbar,也可以用curl命令:

curl -X POST https://www.hackthebox.eu/api/invite/generate
>>> {"success":1,"data":{"code":"UEtXSUMtWldVUVEtWEpGR0ctTlNOUEktR1ZBWU4=","format":"encoded"},"0":200}#

3 aptitude

一般用自带卸载不干净

apt-get autoremove  这个一般卸载不干净

可以使用 aptitude命令,这个命令可卸载依赖包。

apt-get install aptitude

之后就可以使用aptitude命令进行卸载软件了。

aptitude remove  APP

lrzsz

备注:支持xshell和SecureCRT上传下载

apt-get install lrzsz

python切换版本

update-alternatives 来为整个系统更改Python 版本
列出所有可用的python 替代版本信息:

update-alternatives --list python

将python2.7 和 python3.5 放入其中。

update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1

update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2

Python 替代版本中任意切换

 update-alternatives --config python

出错合计

Wget

  • Unable to establish SSL connection
    sudo apt-get install openssl
    -Unable to establish SSL connection
    sudo apt-get install libssl-dev

zsh: command not found: python

whereis python
>>> python: /usr/bin/python3.8 

vim .zshrc
最后一行添加:
export PATH="/usr/bin/python3:$PATH"

/usr/local/lib/libcurl.so.4: no version information available

很坑 冲突问题,主要先找到位置,删除 再链接
在这里插入图片描述

原来旧的链接
ls -l /usr/local/lib/libcurl.so
lrwxrwxrwx 1 root root 16 May 24 17:29 /usr/local/lib/libcurl.so -> libcurl.so.4.2.0

解决方案

解决Ubuntu apt-get update连接超时Connection timed out [IP: 80]

vim /etc/gai.conf

找到下面这一行,去掉注释:

# precedence ::ffff:0:0/96 100

问题 缺失GPGkey

W: GPG error: http://ppa.launchpad.net/yubico/stable/ubuntu cosmic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 43D5C49532CBA1A9
E: The repository 'http://ppa.launchpad.net/yubico/stable/ubuntu cosmic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

解决办法:
执行命令:

apt-key adv --recv-key --keyserver keyserver.linuxmint.com "43D5C49532CBA1A9" (为你missing的key)

问题: aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Parrot/n/a

解决办法:

vim /etc/apt/sources.list
 
deb http://ppa.launchpad.net/yubico/stable/ubuntu cosmic main 
deb-src http://ppa.launchpad.net/yubico/stable/ubuntu cosmic main 
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客
应支付0元
点击重新获取
扫码支付

支付成功即可阅读