Linux 初步2 find tar chmod软件安装apt-get install以及换源安装

查找文件命令:
find:
在指定的目录下查找文件,
find -name 根据文件名搜索
find 路径 -name 文件名
此时是可以递归的搜索的,在该目录下递归,该目录外不管

tar
-v:显示打包或者解包的详细信息
-c:创建打包文件
-f: 指定文件名称,必须放到所以选项的后面
-z:压缩或者解压缩 .gz
-j:压缩后者解压.bz2
-x:解包
-C :解压到指定目录

chmod
chmod u+r file 增加权限
chmod u-r file 减去权限
chmod u=r file 赋予权限

可以设定用python执行
#!/usr/bin/python3 就可以了

sudo -i
exit可以退出

Xshell

创建用户
useradd -m 用户名

sudo passwd 用户名

su -用户名
exit 退出当前的用户
usermod 可以修改用户组

group add test
sudo group add

id USER 可以查看其ID
sudo usermod -g

cat
sudo group groupname
在删除一个组之前需要先把组中的用户删掉,再将组删掉

软件安装:
离线安装:deb
在线安装: apt-get install

deb安装
安装比较慢
apt-get install
可以换源安装

方法:搜索镜像源,可以查到国内的许多镜像源,
https://blog.csdn.net/lxlong89940101/article/details/86617109
比如我点击其中的清华的镜像源在里面找到Ubuntu的镜像源:
点击问号部分
选择我所用的Ubuntu版本,
就可以将那些

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse

放入/etc/apt/sources.list中,添加在最后,实现了换源安装,安装速度飞起

猜你喜欢

转载自blog.csdn.net/LCY133/article/details/108286360