Linux配置

Linux 配置

原文日期: 2017-07-26
来源: https://github.com/wlz0726/wlz0726.github.io


Linux 环境配置

Shell 配置

~/.bashrc

1
2
3
4
5
6
7
8
9
10
# 别名
alias ll='ls -la'
alias gs='git status'
alias gp='git push'

# PATH
export PATH=$HOME/bin:$PATH

# 提示符
export PS1='\u@\h:\w\$ '

~/.bash_profile

1
2
3
4
5
6
7
8
# 加载.bashrc
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi

# 环境变量
export EDITOR=vim
export VISUAL=vim

软件安装

Ubuntu/Debian

1
2
sudo apt-get update
sudo apt-get install package_name

CentOS/RHEL

1
sudo yum install package_name

macOS

1
brew install package_name

常用工具

网络配置

1
2
3
4
5
6
7
8
# 查看 IP
ifconfig

# 查看端口
netstat -tulpn

# SSH 配置
~/.ssh/config

此文档为 GitHub 博客自动归档