文章目录
1、创建虚拟机
2、安装Ubuntu系统







输入主机名:

输入用户名:


输入密码:itcast123

确认密码:







选择不更新:




至此,安装完成。
3、安装完成后配置
3.1.设置root用户的密码

设置root用户的密码为123456
3.2.设置root用户可以远程登录
vim /etc/ssh/sshd_config

保存,退出。重新启动ssh服务。
service ssh restart
3.3.网络设置
网卡1设置:

网卡2设置:

vim /etc/network/interfaces

auto enp0s3
iface enp0s3 inet static
address 192.168.56.70
auto enp0s8
iface enp0s8 inet dhcp

3.4.升级软件包
执行命令:
apt update #更新软件列表
apt upgrade -y
3.5.安装lrzsz
apt install lrzsz -y
3.6.设置只显示当前目录(非必须)
vim ~/.bashrc
这个文件记录了用户终端配置
找到
if [ "$color_prompt " = yes ]; then
PS1 ='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W \[\033[00m\]\$ '
else
PS1 ='${debian_chroot:+($debian_chroot)}\u@\h:\W \$ '
将蓝色的w由小写改成大写,可以表示只显示当前目录名称.
效果:

3.7.安装docker(非必须)
apt install docker.io -y

1236

被折叠的 条评论
为什么被折叠?



