linux基础及网新运维,Linux运维工程师常用到的Linux基础命令(一)

今天小编要跟大家分享的文章是关于Linux运维工程师常用到的Linux基础命令(一)。本篇文章是小编为大家整理的一些常用的Linux基础命令,希望能够对正在从事Linux运维工作的小伙伴们有所帮助。

0f6efa75a61295cf01dbbd491e7c74f4.png

1、[root@ping ~]# tree -L 1 /

#使用tree 命令查看根目录下的一层的目录结构

2、ls - list directory contents

[root@ping ~]# ls -l /

以长格式显示文件和目录的信息

3、[root@ping ~]# ls -d /

显示目录和文件

4、[root@ping ~]# ls -d /*

根目录下的所有的目录和文件

5、cd - Change the shell working directory

[root@ping ~]# cd -

上次一次所在的目录

6、[root@ping /]# cd .

当前目录

7、[root@ping ~]# cd ..

这个目录的上一次目录

8、[root@ping /]# cd ~

当前用户的家目录

9、pwd - Print the name of the current working directory.

[root@ping ~]# pwd

查看当前所处的目录

10、cp - copy files and directories

[root@ping ~]# cp

拷贝文件或目录

11、alias - Define or display aliases

[root@ping ~]# alias rm ="mv"

定义别名alies 为mv 命令

12、unalias - Remove each NAME from the list of defined aliases

[root@ping ~]# alias

alias -rf='you want remvoe files or directories to mv'

alias cp='cp -i'

alias l.='ls -d .* --color=auto'

alias ll='ls -l --color=auto'

alias ls='ls --color=auto'

alias mv='mv -i'

[root@ping ~]# unalias mv

取消mv这个别名

13、cat - concatenate files and print on the standard output

[root@ping ~]# cat -n /root/.bashrc

查看文件内容并列出行号

14、find - search for files in a directory hierarchy

option:!取反、-a(and)并且、-o(or)

[root@ping ~]# find / -type f -name "useradd"

查找根目录下文件类型为文本文件并且包含名字是"useradd" 的文件路径

15、head - output the first part of files

[root@ping ~]# head /etc/services

默认查看文件前十行内容

16、tail - output the last part of files

[root@ping ~]# tail /etc/passwd

默认查看文件后十行内容

17、[root@ping ~]# tail -f /var/log/messages

查看文件动态更新的内容

18、rpm - RPM Package Manager

[root@ping ~]# rpm -ivh /mnt/Packages/elinks.el6_3.x86_64.rpm

安装显示输出rpm软件包情况

19、[root@ping ~]# rpm -qa | grep mysql

查看当前系统安装关于"mysql"的rpm包名

20、yum - Yellowdog Updater Modified

[root@ping ~]# yum -y install ftp

用yum安装ftp管理工具

以上就是小编今天为大家分享的关于Linux运维工程师常用到的Linux基础命令(一)的文章,希望本篇文章能够对正在从事Linux相关工作的小伙伴们有所帮助。想要了解更多Linux相关知识记得关注达内Linux培训官网。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值