Linux(1)——passwd: command not found

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

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章