linux配置

linux
Ubuntu 16.04:这里是桥接模式
1、立即获取ip

ifconfig eth0 192.168.1.112 netmask 255.255.255.0
route add default gw 192.168.1.1
service network restart

配置DNS:gedit /etc/resolv.conf

nameserver 114.114.114.114
nameserver 8.8.8.8

2、配置静态IP
sudo gedit /etc/network/interfaces
修改如下

auto eth0
iface eth0 inet static
address 192.168.3.250
netmask 255.255.255.0
gateway 192.168.3.1
dns-nameserver 114.114.114.114

重启网络
sudo /etc/init.d/networking restart

软件安装卸载
安装
sudo apt-get install gcc
卸载软件
sudo apt-get --purge remove gcc
卸载程序
sudo apt-get remove gcc

获取更新源
vim /etc/apt/sources.list
更新源,参考,参考1

ssh
安装ssh:apt-get install openssh-server

zsh
安装

apt lock
sudo rm /var/lib/apt/lists/lock

vim
vim ~/.vimrc--->set nu

phpstudy
使用方法,在终端中使用sudo 或者 使用管理员账号运行 phpstudy start 开启
phpstudy start | stop | restart 开启 | 停止 | 重启

apache配置文件:/phpstudy/server/httpd/conf/httpd.conf
PHP配置文件:/phpstudy/server/php/etc/php.ini
打开Mysql控制台: /phpstudy/mysql/bin/mysql -uroot -proot

你可能感兴趣的:(linux配置)