Linux(1)——passwd: command not found

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u013043341/article/details/84583687

Q:Question问题

A:Answer答案

E:End结果

M:More更多

 

Q:本想修改Linux服务器root账号的密码,不曾想passwd命令不能修改,还报:-bash: passwd: command not found,于是便有了此篇

[root@c8a0a4d84a01 ~]# passwd
-bash: passwd: command not found

A:安装passwd

yum install passwd Setting up Install Process Setting up

[root@c8a0a4d84a01 ~]# passwd root
bash: passwd: command not found
[root@c8a0a4d84a01 ~]# /usr/bin/passwd
bash: /usr/bin/passwd: No such file or directory
[root@c8a0a4d84a01 ~]# whereis passwd
passwd: /etc/passwd
[root@c8a0a4d84a01 ~]# yum install passwd Setting up Install Process Setting up repositories
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.tuna.tsinghua.edu.cn
 * extras: mirrors.cn99.com
 * updates: mirrors.tuna.tsinghua.edu.cn
base                                                                 | 3.7 kB     00:00     
extras                                                               | 3.4 kB     00:00     
updates                                                              | 3.4 kB     00:00     
No package Setting available.
No package up available.
No package Install available.
No package Process available.
No package Setting available.
No package up available.
No package repositories available.
Resolving Dependencies
--> Running transaction check
---> Package passwd.x86_64 0:0.77-7.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================
 Package             Arch                Version                    Repository         Size
============================================================================================
Installing:
 passwd              x86_64              0.77-7.el6                 base               89 k

Transaction Summary
============================================================================================
Install       1 Package(s)

Total download size: 89 k
Installed size: 349 k
Is this ok [y/N]: y
Downloading Packages:
passwd-0.77-7.el6.x86_64.rpm                                         |  89 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : passwd-0.77-7.el6.x86_64                                                 1/1 
  Verifying  : passwd-0.77-7.el6.x86_64                                                 1/1 

Installed:
  passwd.x86_64 0:0.77-7.el6                                                                

Complete!

E:最后完美修改root的密码(输入两遍新密码)

[root@c8a0a4d84a01 ~]# passwd
Changing password for user root.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.

M:针对 -bash : xxx : command not found 现象,总结一下Linux的相关命令的安装方法

1)ifconfig (网络\IP),安装netstat: yum install net-tools

2)unzip zip(压缩\解压缩) : yum install -y unzip zip

3)rz (文件上传) : yum -y install lrzsz

4)jdk(java):yum install java-1.8.0-openjdk  

5)安装wget: yum -y install wget

6)firewall-cmd:yum install firewalld systemd -y

7)安装更新系统时间:yum install ntpdate

8)安装tree:yum -y install tree

9)安装vim:yum -y install vim

 

 

展开阅读全文

没有更多推荐了,返回首页