Linux必备故障及原因

一 文件和目录类

• File exist 文件已经存在
• No such file or directory 没有这个文件或目录(这个东西不存在)
• command not found 命令找不到(没有这个命令)
• invalid option 无效的参数(不可用的参数)
• overwrite 覆盖
• remove regular empty file 是否删除普通文件(空的)?
• is a directory xxx是一个目录
• descend into directory 是否进入目录
• Invalid level 无效的层数,层数必须大于0
• Can’t open file for writing 无法打开这个文件
• No write since last change
• xx column window is too narrow 窗口只有xx列太窄了 无法完全显示
• xxx not a directory 不是一个目录
• 查看压缩包的时候报错
• You have mail in /var/spool/mail/root
• permission denied
• Warning: Changing a readonly file
• ‘readonly’ option is set (add ! to override)
• cp: omitting directory ‘/oldboy/’
unexpected end of file 或 Unexpected EOF in archive

二. 网络连接类

• 远程连接错误 Connection Failed 连接失败
• yum安装软件故障提示 Could not resolve host无法解析主机
• yum安装软件提示:Nothing to do (没事做)
• 没有找到叫treea的软件包
• Name or service not known 域名无法识别(无法上网)

三. 修改系统基础配置类

• 重启网卡报错 device not present
• 修改主机名过程中,命令行中主机名没有变化
• hostname命令修改主机名(临时 重启服务器之后失效)
• 命令行中的主机名部分没有改变?

四. 用户相关错误

• user ‘oldboy’ already exists
• no such user
• Only root can do that.
• Only root can specify a user name.
• Creating mailbox file: File exists
• warning: the home directory already exists.
• /etc/sudoers: syntax error near line 105 <<<

五.脚本及定时任务

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 versionPackage 1:bash-completion-2.1-6.el7.noarch already installed and latest versionNothing to do
情况2:软件名字写错或没有配置yum源导致找不到这个软件包
[root@oldboyedu60-lnb ~]# yum install treea -yLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfile

  • base: mirror.lzu.edu.cn
  • extras: mirrors.nwsuaf.edu.cn
  • updates: mirrors.nwsuaf.edu.cnbase | 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
    情况3:你需要安装软件包而不是软件包里面的命令
    通过yum provides 查看命令属于哪个软件包
    [root@oldboyedu59 ~]# yum install -y locate Loaded plugins: fastestmirrorDetermining fastest mirrors
  • base: mirrors.aliyun.com
  • extras: mirrors.aliyun.com
  • updates: mirrors.aliyun.combase | 3.6 kB 00:00:00
    extras | 3.4 kB 00:00:00
    updates | 3.4 kB 00:00:00 (1/2): extras/7/x86_64/primary_db | 187 kB 00:00:02 (2/2): updates/7/x86_64/primary_db | 3.4 MB 00:00:04 No package locate available.
    Error: Nothing to do
    [root@oldboyedu59 ~]# yum provides locate Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfile
  • base: mirrors.aliyun.com
  • extras: mirrors.aliyun.com
  • updates: mirrors.aliyun.combase/7/x86_64/filelists_db | 7.1 MB 00:00:03
    extras/7/x86_64/filelists_db | 236 kB 00:00:00
    updates/7/x86_64/filelists_db | 2.7 MB 00:00:01
    mlocate-0.26-8.el7.x86_64 : An utility for finding files by name
    Repo : baseMatched from:
    Filename : /usr/bin/locate[root@oldboyedu59 ~]# yum install -y mlocate Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfile
  • base: mirrors.aliyun.com
  • extras: mirrors.aliyun.com
  • updates: mirrors.aliyun.comResolving Dependencies–> Running transaction check—> Package mlocate.x86_64 0:0.26-8.el7 will be installed–> Finished Dependency Resolution
    Dependencies Resolved
    =========================================================================================================================
    Package Arch Version Repository Size=========================================================================================================================
    Installing:
    mlocate x86_64 0.26-8.el7 base 113 k
    Transaction Summary=========================================================================================================================Install 1 Package
    Total download size: 113 kInstalled size: 379 kDownloading packages:
    mlocate-0.26-8.el7.x86_64.rpm | 113 kB 00:00:02 Running transaction checkRunning transaction testTransaction test succeededRunning transaction
    Installing : mlocate-0.26-8.el7.x86_64 1/1
    Verifying : mlocate-0.26-8.el7.x86_64 1/1

Installed:
mlocate.x86_64 0:0.26-8.el7

Complete![root@oldboyedu59 ~]# rpm -qa mlocate
mlocate-0.26-8.el7.x86_64

  1. Name or service not known 域名无法识别(无法上网)
    原因1:DNS配置错误
    原因2:Linux无法上网原因 https://www.jianshu.com/p/0bc0b596c1a0
    [root@oldboyedu59 ~]# ping baidu.com
    ping: baidu.com: Name or service not known
    域名无法识别(无法将域名---->ip地址)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值