阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

Linux运维工程师常用到的Linux基础命令

87次阅读
没有评论

共计 1628 个字符,预计需要花费 5 分钟才能阅读完成。

今天小编要跟大家分享的文章是关于 Linux 运维工程师常用到的 Linux 基础命令(一)。本篇文章是小编为大家整理的一些常用的 Linux 基础命令,Linux 入门 新手和正在 Linux 学习 的小伙伴快来看一看吧,希望能够对大家有所帮助!

Linux 运维工程师常用到的 Linux 基础命令

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 相关知识记得关注 马哥教育 官网。

声明:文章来源于网络,侵删!

正文完
星哥说事-微信公众号
post-qrcode
 
星锅
版权声明:本站原创文章,由 星锅 2022-12-03发表,共计1628字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中