2021-04-24Linux基本使用

这篇博客介绍了Linux系统的基本操作,包括查看系统版本、管理文件和目录、设置IP、使用find、cp、mv等命令,以及使用vim编辑器进行文本操作。还涉及到用户管理、文件权限、备份和压缩等实用技巧。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

查看系统版本
cat /etc/redhat-release
   //输出:CentOS Linux release 7.5.1804 (Core)
查看psswd 
less /etc/passwd
临时设置IP
ifconfig ens33 192.168.1.1

4-6日
递归创建目录加上-r
复制目录也要加-r


1.将/mnt/public/linux.txt文件复制到/root目录下,同时 改名为 study.txt
cp  /mnt/public/linux.txt   /root/study

2.将/etc/passwd 、/etc/resolv.conf、/etc/hostname 同时拷贝到/mnt/public/目录下
  [root@Z ~]# cp  /etc/passwd  /etc/resolv.conf  /etc/hostname  /mnt/public/
  [root@Z ~]# ls  /mnt/public/

3.将文件 /mnt/public/hostname 重改名为 stu.txt 
   [root@Z ~]# mv  /mnt/public/hostname  /mnt/public/stu.txt
   [root@Z ~]# ls  /mnt/public/
   linux.txt   passwd   resolv.conf   stu.txt

4.创建目录结构/mnt/public/test/vm
 [root@Z ~]# mkdir /mnt/public/test
 [root@Z ~]# mkdir /mnt/public/test/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值