Linux基础(01)开发环境的搭建
1.在虚拟机安装ubuntu 14.04版本 (安装时设置好用户名和密码)
2.安装vm tools(屏幕自适应)
3.配置虚拟机网络可以保证网络畅通
4.在windows安装 source insight4.0(代码编辑,不能编译) , file zilla(连接linux,把写好的代码传到linux编译) , xshell(终端模拟,可以远程连接linux调试代码)
5.在linux终端(ctrl+alt+t)进入root权限(sudo su 进入root)
1.gedit /etc/apt/sources.list (更新系统的源文件 把内容全部替换成下列源并保存)
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
apt-get update(进行更新)
2.apt-get install ssh (安装ssh服务器 (lsof -i :22)测试ssh是否安装成功 有两个进程证明安装成功)(ssh可以远程连接) ifconfig查看当前网络
远程连接使用普通用户
添加普通用户 : useradd name 回车 passwd name 回车 设置密码
切换用户 : su username
6.在windows使用xshell 安装zsh(命令行工具让目录看来美观(不是必须的)) https://blog.csdn.net/tianjiewang/article/details/78961327
cat /etc/shells
sudo apt-get install zsh
sudo apt-get install git-core
sh -c "$(curl -fssl https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
chsh -s `which zsh` (添加到系统默认)
echo $shell (输出当前使用的bash)
cat ~/.zshrc | grep "zsh_theme" (查看当前使用主题)