目录

一. 文件和目录类

1.1 File exist 文件已经存在

1.2 No such file or directory 没有这个文件或目录(这个东西不存在)

1.3 command not found 命令找不到(没有这个命令)

1.4 invalid option 无效的参数(不可用的参数)

1.5 overwrite 覆盖

1.6 remove regular empty file 是否删除普通文件(空的)

1.7 is a directory xxx是一个目录

1.8 descend into directory 是否进入目录

1.10 Can‘t open file for writing 无法打开这个文件

1.11 No write since last change

1.12 xx column window is too narrow 窗口只有xx列太窄了 无法完全显示

二. 网络连接类

2.1 远程连接错误 Connection Failed 连接失败

2.2 yum安装软件故障提示 Could not resolve host无法解析主机

2.3 yum安装软件提示:Nothing to do (没事做)

2.4 Name or service not known 域名无法识别(无法上网)

三. 修改系统基础配置类

3.1 重启网卡报错 device not present

3.2 修改主机名过程中,命令行中主机名没有变化

1 hostname命令修改主机名(临时 重启服务器之后失效)

2 修改文件内容(写合同 永久 重启服务器之后生效)

3 检查

命令行中的主机名部分没有改变?

一. 文件和目录类

1.1 File exist 文件已经存在

[[email protected] ~]# mkdir /data /lidao

[[email protected] ~]# mkdir /data /lidao

mkdir: cannot create directory ‘/data’: File exists

mkdir: cannot create directory ‘/lidao’: File exists

mkdir: cannot create directory ‘/lidao’: File exists

无法 创建 目录 因为这个目录已经存在

1.2 No such file or directory 没有这个文件或目录(这个东西不存在)

没有这个目录:文件或路径书写错误

[[email protected] ~]# mkdir /oldboy

[[email protected] ~]# cd oldboy

-bash: cd: oldboy: No such file or directory

mkdir命令本身问题:mkdir 命令默认只能创建1层目录 创建多层报错

-p解决

[[email protected] ~]# mkdir /data/oldboy/lidao/

mkdir: cannot create directory ‘/data/oldboy/lidao/’: No such file or directory

touch命令只能创建文件,目录不存在则会报错

解决:先创建目录,再创建文件

[[email protected] ~]# ls /oldboy/

oldboy.txt

[[email protected] ~]# touch /oldboy/lidao/alex/oldboy.txt

touch: cannot touch ‘/oldboy/lidao/alex/oldboy.txt’: No such file or directory

排错思路:

1、ls命令检查对应的目录是否存在?

2、目录不存在 先创建目录在创建文件/

1.3 command not found 命令找不到(没有这个命令)

[[email protected] ~]# mkdiy

-bash: mkdiy: command not found

1.书写错误

2.没有安装

1.4 invalid option 无效的参数(不可用的参数)

[[email protected] ~]# touch -p /oldboy/oldboy.txt

touch: invalid option -- 'p'

Try 'touch --help' for more information.

1.5 overwrite 覆盖

cp复制如果已经存在这个文件会提示是否覆盖

[[email protected] ~]# cp /oldboy/oldboy.txt /tmp/

cp: overwrite ‘/tmp/oldboy.txt’?

1.6 remove regular empty file 是否删除普通文件(空的)

[[email protected] ~]# rm /oldboy/oldboy.txt

rm: remove regular empty file ‘/oldboy/oldboy.txt’?

1.7 is a directory xxx是一个目录

rm默认无法删除目录

解决:加上-r 或-rf

[[email protected] ~]# rm /data/

rm: cannot remove ‘/data/’: Is a directory

vi命令中 使用vi编辑目录也会报错

"/oldboy"

E502: "/oldboy" is a directory

Press ENTER or type command to continue

1.8 descend into directory 是否进入目录

[[email protected] ~]# rm -r /data/

rm: descend into directory ‘/data/’? y

rm: remove regular empty file ‘/data/oldboy01.txt’? n

rm: remove regular empty file ‘/data/oldboy02.txt’? n

rm: remove regular empty file ‘/data/oldboy03.txt’? n

rm: remove regular empty file ‘/data/oldboy04.txt’? n

rm: remove regular empty file ‘/data/oldboy05.txt’? n

rm: remove regular empty file ‘/data/oldboy06.txt’? n

rm: remove regular empty file ‘/data/oldboy07.txt’? n

rm: remove regular empty file ‘/data/oldboy08.txt’? n

rm: remove regular empty file ‘/data/oldboy09.txt’? n

rm: remove regular empty file ‘/data/oldboy10.txt’? n

rm: remove directory ‘/data/’? n

1.9 Invalid level 无效的层数,层数必须大于0

注意参数位置

[[email protected] ~]# tree -L -F 2 /

tree: Invalid level, must be greater than 0.

1.10 Can‘t open file for writing 无法打开这个文件

vi中 如果目录不存在就会提示

"/oldbyo/oldboy.txt"

"/oldbyo/oldboy.txt" E212: Can't open file for writing

Press ENTER or type command to continue

1.11 No write since last change

E37: No write since last change (add ! to override)

粘包赖(你修改了内容就无法使用:q退出 需要使用:q!

1.12 xx column window is too narrow 窗口只有xx列太窄了 无法完全显示

这是w的坑 空间太小施展不开.

[[email protected] ~]# w

w: 39 column window is too narrow

二. 网络连接类

2.1 远程连接错误 Connection Failed 连接失败

使用Xshell远程连接失败提示,检查端口是否开启或正确

[c:\~]$

Connecting to 10.0.0.200:233...

Could not connect to '10.0.0.200' (port 233): Connection failed.

Type `help' to learn how to use Xshell prompt.

使用telnet测试端口是否打开

[c:\~]$ telnet 10.0.0.200 233

Connecting to 10.0.0.200:233...

Could not connect to '10.0.0.200' (port 233): Connection failed. #233端口没有开启

Type `help' to learn how to use Xshell prompt.

端口开启

[c:\~]$ telnet 10.0.0.200 22

Connecting to 10.0.0.200:22...

Connection established. #端口开启

To escape to local shell, press 'Ctrl+Alt+]'.

SSH-2.0-OpenSSH_7.4

Protocol mismatch.

Connection closed by foreign host.

Disconnected from remote host(10.0.0.200:22) at 12:22:54.

Type `help' to learn how to use Xshell prompt.

[c:\~]$

2.2 yum安装软件故障提示 Could not resolve host无法解析主机

Could not resolve host无法解析主机

主要是系统能否上网和DNS问题.

http://mirrors.tuna.tsinghua.edu.cn/centos/7.6.1810/updates/x86_64/repodata/repomd.xml: [Errno 14] curl#6 -

"Could not resolve host: mirrors.tuna.tsinghua.edu.cn; Unknown error"

Trying other mirror.

2.3 yum安装软件提示:Nothing to do (没事做)

有两种情况:

情况1:软件已经安装并且最新如下:

Package tree-1.6.0-10.el7.x86_64 already installed and latest version

tree软件包已经安装并且是最新版本

Package 2:vim-enhanced-7.4.160-5.el7.x86_64 already installed and latest version

Package 1:bash-completion-2.1-6.el7.noarch already installed and latest version

Nothing to do

情况2:软件名字写错或没有配置yum源导致找不到这个软件包

[[email protected] ~]# yum install treea -y

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

* base: mirror.lzu.edu.cn

* extras: mirrors.nwsuaf.edu.cn

* updates: mirrors.nwsuaf.edu.cn

base | 3.6 kB 00:00:00

extras | 3.4 kB 00:00:00

updates | 3.4 kB 00:00:00

No package treea available.

#没有找到叫treea的软件包

Error: Nothing to do

2.4 Name or service not known 域名无法识别(无法上网)

原因:

1:DNS配置错误原因

2:Linux无法上网原因

[[email protected] ~]# ping baidu.com

ping: baidu.com: Name or service not known

域名无法识别(无法将域名---->ip地址)

三. 修改系统基础配置类

3.1 重启网卡报错 device not present

[[email protected] ~]# systemctl restart network

Job for network.service failed because the control process exited with error code.

See "systemctl status network.service" and "journalctl -xe" for details.

查看详细错误原因

·journalctl -xe·

Apr 01 15:31:05 oldboyusd.1 network[7816]: Bringing up interface etho: ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device does not seem to be present, delaying initialization.

Apr 01 15:31:05 oldboyusd.1 /etc/sysconfig/network-scripts/ifup-eth[8019]: Device does not seem to be present, delaying initializatio

3.2 修改主机名过程中,命令行中主机名没有变化

1 hostname命令修改主机名(临时 重启服务器之后失效)

[[email protected] ~]# hostname

oldboyedu59

[[email protected] ~]# hostname oldboyedu59-lnb

2 修改文件内容(写合同 永久 重启服务器之后生效)

vim /etc/hostname

oldboyedu59-lnb

3 检查

[[email protected] ~]# hostname

oldboyedu59-lnb

[[email protected] ~]# cat /etc/hostname

oldboyedu59-lnb

命令行中的主机名部分没有改变?

解决:重新登录下即可(断开连接,重新连接)

[[email protected] ~]#

linux运维服务常见故障,linux常见故障处理相关推荐

  1. linux 系统速度慢,Linux运维人员你知道Linux系统运行速度太慢的原因吗?

    今天小编要跟大家分享的文章是关于Linux系统运行速度太慢的原因.相信正在从事Linux运维工作的小伙伴都会遇到过Linux系统运行速度过慢的问题,那遇到这种情况时,应该怎么解决呢?我们在搞清楚如何加 ...

  2. linux crontab不运行,Linux运维知识之解决Linux中crontab不执行ntpdate问题

    本文主要向大家介绍了Linux运维知识之解决Linux中crontab不执行ntpdate问题,通过具体的内容向大家展现,希望对大家学习Linux运维知识有所帮助. 解决Linux中crontab尚未 ...

  3. linux运维工程师命令,Linux运维工程师的常用Linux命令汇总

    今天小编要跟大家分享的文章是关于Linux运维工程师的常用Linux命令汇总.作为运维人员,这些常用命令不得不会,掌握这些命令,工作上会事半功倍,提供工作效率.下面来和小编一起看一看吧! 一.文件和目 ...

  4. linux sudo 命令无法使用,Linux运维知识之解决Linux下无法使用sudo命令问题

    本文主要向大家介绍了Linux运维知识之解决Linux下无法使用sudo命令问题,通过具体的内容向大家展现,希望对大家学习Linux运维知识有所帮助. 问题描述 使用普通用户登录后在终端中执行sudo ...

  5. linux运维培训后面试,Linux运维岗位面试中常见的面试问题汇总

    今天小编要跟大家分享的文章是关于Linux运维岗位面试中常见的面试问题汇总.正准备参加Linux运维面试的小伙伴们来和小编一起看一看吧,希望本篇文章能够对正在从事Linux运维工作的小伙伴们有所帮助. ...

  6. 太原linux运维学校,山西太原linux运维培训班价格思诺培训价格表

    山西太原linux运维培训班价格思诺培训价格表.在所有市场中,对专业技能进行的培训和认证的需求都是存在的,因为企业需要它们,井且其他先进技术不断涌现.企业需要的人才不仅仅拥有产品或技术上的技能一一他们 ...

  7. Linux运维是什么?linux运维的基础知识

    如果您对运维行业了解一些,应该会知道,现在的运维早已不是早年的"睡机房",往办公室打眼一看,分不清是运维攻城狮还是开发程序猿,但是,运维这行也是春天到了,今天Linux,明天云计算 ...

  8. Linux运维如何提高自己,Linux运维小白该如何提高自己?

    今天小编要跟大家分享的文章是关于Linux运维小白该如何提高自己?在这个现如今的互联网高速发展的时代,如何才能保持住一门铁的饭碗.无疑最稳妥的自然就是选择一门任何时代都不会落伍的技能,来选择深入学习研 ...

  9. 英语不好学linux运维难吗,学Linux系统难吗?学好Linux运维需要多久

    随着近年来经济的快速发展,企业对Linux人才的需求也越来越高.许多人认为,Linux是一个非常简单的行业,然而,Linux行业是一个综合了云计算.Linux运维.Linux开发.Linux编程等多方 ...

  10. linux 运维高级脚本生成器,Linux运维系列,Shell高级脚本自动化编程实战

    课程文件目录: Linux自动化运维系列 Shell高级脚本自动化编程实战 [6.1G] ┣━━01.Shell基础概述 [315.1M] ┃ ┣━━1-1 Shell脚本体系概述.mp4 [154. ...

最新文章

  1. 图片资源 php,php图片转为资源数据
  2. python贴吧爬虫-Python 爬虫练习: 爬取百度贴吧中的图片
  3. Tcpdump抓包工具的使用
  4. day 05 多行输出与多行注释、字符串的格式化输出、预设创建者和日期
  5. 阻止xap文件在浏览器中缓存
  6. 运放组成的吉他放大电路_如何通过5个步骤构建开放式硬件吉他放大器
  7. Spring Boot 操作 Memcache
  8. Ext3.4--布局
  9. linux磁盘fio压力测试,fio命令 – 对磁盘进行压力测试和验证
  10. 【数据库】MySql分割字符串
  11. 操作系统实验 文件复制/复制文件
  12. RS-485通信协议(ModBus版)
  13. 概率论于数理统计(陈希孺)笔记2.3
  14. 数据流图、业务流程图、E-R图、系统功能结构图、程序流程图
  15. 程序员学算法必备网站之一:VisuAlgo
  16. 服务器 ssd虚拟内存,ssd虚拟内存设多大
  17. 如何在企业微信中使用微搭低代码
  18. [Office] 公务员WPS Excel常用的一些技巧方法
  19. fromkeys()
  20. 企业网络及应用层安全防护技术精要

热门文章

  1. python下俄罗斯方块的游戏设计_[源码和文档分享]基于Python的PyGame的俄罗斯方块游戏设计与实现...
  2. 多目标遗传算法与优化的关系
  3. openssh漏洞_技术干货 | OpenSSH命令注入漏洞复现(CVE202015778)
  4. ak和sk怎么认证 海康威视_公有云API的认证方式:AK/SK 简介
  5. Oracle date日期类型使用
  6. MCGS 无限配方数据存储及U盘导入导出-第二集
  7. java爬虫爬取主流房屋网站
  8. 鸿蒙系统和你,鸿蒙系统面世,但与您所想的不一样
  9. android 蒙版图片带拖动_黑橙修图:新手入门篇2-一句话带你认识图层蒙版
  10. BUU OJ 做题记录