文件系统
/
/home/
/root
/bin
/mnt
/usr
/etc
设置root密码
刚开始安装虚拟机的时候,只会让你新建用户和密码,这个用户和密码没有root权限,所以进入后,需要设置root密码
这里首先会让你输入当前用户的密码,输入正确之后,会让你输入一个全新的root密码
Ubuntu安装vmware tools
首先,点击虚拟机上面的安装tools,之后提取到一个目录下
之后在该目录中su root进入root权限,之后执行./vmware-install.pl
更改国内源
1.备份源列表
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
2.代开sources.list文件修改
sudo gedit /etc/apt/sources.list
编辑/etc/apt/sources.list文件, 在文件最前面添加阿里云镜像源:
阿里源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
3.刷新列表
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
4.其他源
中科大源
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
163源
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
安装ifconfig
sudo apt install net-tools
注:需要现更新软件包,之后在安装net-tools
Linux安装软件出现“无法获得锁”解决方法
当我们安装应用后,中途断开后,我们在想安装,出现“无法获得锁”提示,那么我们可以按照以下的方法解决。
/var/lib/dpkg/lock-frontend 这个资源被占用了,因为一些特殊原因安装失败,但是进程依然占用着该资源。
rm /var/lib/dpkg/lock-frontend
若运行后,还是有问题,可以在运行下面的三个命令
rm /var/lib/dpkg/lock
rm /var/lib/dpkg/lock-frontend
rm /var/cache/apt/archives/lock
ubuntu安装软件时出现,无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系
一般是由于安装源的问题,我们国内下载一般用中国的服务器,但是用中国的服务器之后,更新内容是没问题的,下载快。但是有些服务下载不了,必须我们要换回官方源,这时候,我们才能继续安装。
注:其实就是找不到软件包,或者依赖有问题。
安装SSH服务
安装ssh服务器
sudo apt install openssh-server
安装ssh客户端
sudo apt install openssh-client
配置SSH客户端去掉PasswordAuthentication yes前面的#号,保存退出
sudo vi /etc/ssh/ssh_config
重启SSH服务
sudo /etc/init.d/ssh restart
安装XFTP
注:但是我没有安装也可以使用xtfp连接ubuntu,可能是之前安装了。
1、安装:
sudo apt-get install vsftpd
2、启动:
sudo /etc/init.d/vsftpd restart
安装VIM
我发现好像用国内源,好多包都找不到,还是我设置有问题,所以我换成了官方源
sudo apt-get install vim-gtk【我是ubuntu,安装命令如下】
到现在一个从安装ubuntu,到解决问题,到管理linux,基本上已经完成了,下面可以使用了。以后,若是下载包,若是中国源不行,那么可以使用官方源。
kali更换源
将下面内容放进去(更新源不适合放太多,挑一两个源就行了)
#For information about how to configure apt package sources,
#see the sources.list(5) manual.
#deb http://http.kali.org/kali kali-rolling main non-free contrib
#阿里云
deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib
deb-src http://mirrors.aliyun.com/kali kali-rolling main non-free contrib
#中科大
deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
#官方源
deb http://http.kali.org/kali kali-rolling main non-free contrib
deb-src http://http.kali.org/kali kali-rolling main non-free contrib
apt-get update
#更新索引文件
apt-get upgrade
#更新软件包
原文链接:https://blog.csdn.net/wjwqp/article/details/105076894