简介
A
ab
accept
ack
ag
alias
apachectl
apk
apropos
apt-get
aptitude
apt-key
apt-sortpkgs
ar
arch
arj
arp
arpd
arping
arptables
arpwatch
as
at
atop
atq
atrm
awk
axel
B
badblocks
base64
basename
batch
bc
bg
bind
blkid
blockdev
bmodinfo
break
builtin
bunzip2
bye
bzcat
bzcmp
bzdiff
bzgrep
bzip2
bzip2recover
bzless
bzmore
C
cal
cancel
cat
cd
cdrecord
chage
chattr
chcon
chfn
chgrp
chkconfig
chmod
chown
chpasswd
chroot
chsh
cksum
clear
clock
clockdiff
cmp
col
colrm
column
comm
command
compress
consoletype
continue
convertquota
cp
cpio
createrepo
crontab
csplit
cu
cupsdisable
cupsenable
curl
cut
D
date
dc
dd
declare
depmod
df
dhclient
dhcpd
dhcrelay
diff
diff3
diffstat
dig
dircolors
dirname
dirs
disown
dmesg
dmidecode
dnf
dnsdomainname
docker
domainname
dos2unix
dpkg-deb
dpkg-divert
dpkg-preconfigure
dpkg-query
dpkg-reconfigure
dpkg-split
dpkg-statoverride
dpkg-trigger
dpkg
dris
dstat
du
dump
E
e2fsck
e2label
echo
ed
edquota
egrep
eject
elinks
elm
emacs
enable
env
ethtool
ex
exec
exit
expand
export
exportfs
expr
F
false
fc
fdisk
fg
fgrep
file
find
findfs
finger
firewall-cmd
fishshell
fmt
fold
fping
free
fsck
ftp
ftpcount
ftpshut
ftptop
ftpwho
fuser
G
gcc
gcov
gdb
get_module
getenforce
getent
getsebool
git
gpasswd
gpm
grep
groupadd
groupdel
groupmems
groupmod
groups
grpck
grpconv
grpunconv
grub
grub2-mkconfig
grub2-set-default
gunzip
gzexe
gzip
H
halt
hcitool
hdparm
head
help
hexdump
history
host
hostid
hostname
hostnamectl
hping3
htdigest
htop
htpasswd
hwclock
I
iconv
id
ifcfg
ifconfig
ifdown
ifstat
iftop
ifup
indent
info
init
inotifywait
insmod
install
iostat
iotop
ip
ip6tables-restore
ip6tables-save
ip6tables
ipcalc
ipcrm
ipcs
iperf
iptables-restore
iptables-save
iptables
iptraf
iptstate
iscsiadm
ispell
J
jed
jobs
joe
join
journalctl
jq
jwhois
K
kernelversion
kexec
kill
killall
L
last
lastb
lastlog
ld
ldconfig
ldd
less
let
lftp
lftpget
lha
lilo
ln
lnstat
local
locate
logger
login
logname
logout
logrotate
logsave
logwatch
look
losetup
lp
lpadmin
lpc
lpq
lpr
lprm
lpstat
ls
lsattr
lsb_release
lsblk
lscpu
lsmod
lsof
lspci
lsusb
ltrace
lvcreate
lvdisplay
lvextend
lvreduce
lvremove
lvresize
lvscan
lynx
M
mail
mailq
mailstat
make
man
mapfile
md5sum
mesg
mii-tool
mkbootdisk
mkcert
mkdir
mke2fs
mkfs
mkinitrd
mkisofs
mknod
mkswap
mktemp
modetest
modprobe
more
mount
mpstat
mtools
mtr
mv
mysql
mysqladmin
mysqldump
mysqlimport
mysqlshow
N
named-checkzone
nano
nc
ncftp
neofetch
nethogs
netstat
newusers
nfsstat
ngrep
nice
nisdomainname
nl
nm
nmap
nmcli
nohup
nologin
nproc
nslookup
ntpdate
ntsysv
O
objdump
od
openssl
P
pacman
parted
partprobe
passwd
paste
patch
pathchk
perl
pfctl
pgrep
php
pico
pidof
pidstat
pigz
ping
ping6
pip
pkexec
pkill
pmap
popd
poweroff
ppp-off
pr
printf
protoize
prtstat
ps
pssh
pstack
pstree
pushd
pv
pvchange
pvck
pvcreate
pvdisplay
pvremove
pvs
pvscan
pwck
pwconv
pwd
pwdx
pwunconv
Q
quota
quotacheck
quotaoff
quotaon
R
rcconf
rcp
read
readelf
readonly
reboot
reject
rename
renice
reposync
repquota
resize
restore
restorecon
return
rev
rexec
rlogin
rm
rmdir
rmmod
route
rpm
rpm2cpio
rpmbuild
rpmdb
rpmquery
rpmsign
rpmverify
rsh
rsync
runlevel
S
sar
scp
screen
script
scriptreplay
sed
seinfo
semanage
sendmail
seq
service
sesearch
set
setfacl
setpci
setsebool
setsid
sftp-server
sftp
sh
sha256sum
shift
shopt
showmount
shuf
shutdown
skill
slabtop
sleep
slocate
smartmontools
smbclient
smbpasswd
sort
source
speedtest-cli
spell
split
squid
squidclient
ss
ssh-add
ssh-agent
ssh-copy-id
ssh-keygen
ssh-keyscan
ssh
sshd
sshpass
startx
stat
strace
strings
stty
su
sudo
sum
supervisord
suspend
swapoff
swapon
sync
sysctl
syslog
systemctl
systool
T
tac
tail
tailf
talk
tar
tcpdump
tcpreplay
tee
telinit
telnet
tempfile
test
tftp
time
timedatectl
times
tload
tmux
top
touch
tput
tr
tracepath
traceroute
trap
tree
true
tty
type
U
ulimit
umask
umount
unalias
uname
unarj
uncompress
unexpand
uniq
unlink
unprotoize
unrar
unset
unzip
updatedb
uptime
useradd
userdel
usermod
usernetctl
users
uucico
uupick
uuto
V
vdfuse
vgchange
vgconvert
vgcreate
vgdisplay
vgextend
vgreduce
vgremove
vgrename
vgscan
vi
vmstat
volname
W
w
wait
wall
watch
wc
wget
whatis
whereis
which
who
whoami
write
X
xargs
xauth
xclip
xhost
xinit
xlsatoms
xlsclients
xlsfonts
xrandr
xset
xz
Y
yes
ypdomainname
yum
Z
zcat
zfore
zip
zipinfo
zipsplit
znew
其他
7z
yum - Linux命令大全 - 笔下光年
网站首页
yum
基于RPM的软件包管理器 ## 补充说明 **yum命令** 是在Fedora和RedHat以及SUSE中基于rpm的软件包管理器,它可以使系统管理人员交互和自动化地更新与管理RPM软件包,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软体包,无须繁琐地一次次下载、安装。 yum提供了查找、安装、删除某一个、一组甚至全部软件包的命令,而且命令简洁而又好记。 ### 语法 ```shell yum(选项)(参数) ``` ### 选项 ```shell -h:显示帮助信息; -y:对所有的提问都回答“yes”; -c:指定配置文件; -q:安静模式; -v:详细模式; -d:设置调试等级(0-10); -e:设置错误等级(0-10); -R:设置yum处理一个命令的最大等待时间; -C:完全从缓存中运行,而不去下载或者更新任何头文件。 ``` ### 参数 ```shell install:安装rpm软件包; update:更新rpm软件包; check-update:检查是否有可用的更新rpm软件包; remove:删除指定的rpm软件包; list:显示软件包的信息; search:检查软件包的信息; info:显示指定的rpm软件包的描述信息和概要信息; clean:清理yum过期的缓存; shell:进入yum的shell提示符; resolvedep:显示rpm软件包的依赖关系; localinstall:安装本地的rpm软件包; localupdate:显示本地rpm软件包进行更新; deplist:显示rpm软件包的所有依赖关系; provides:查询某个程序所在安装包。 ``` ### 实例 部分常用的命令包括: * 自动搜索最快镜像插件:`yum install yum-fastestmirror` * 安装yum图形窗口插件:`yum install yumex` * 查看可能批量安装的列表:`yum grouplist` **安装** ```shell yum install #全部安装 yum install package1 #安装指定的安装包package1 yum groupinsall group1 #安装程序组group1 ``` **更新和升级** ```shell yum update #全部更新 yum update package1 #更新指定程序包package1 yum check-update #检查可更新的程序 yum upgrade package1 #升级指定程序包package1 yum groupupdate group1 #升级程序组group1 ``` **查找和显示** ```shell # 检查 MySQL 是否已安装 yum list installed | grep mysql yum list installed mysql* yum info package1 #显示安装包信息package1 yum list #显示所有已经安装和可以安装的程序包 yum list package1 #显示指定程序包安装情况package1 yum groupinfo group1 #显示程序组group1信息yum search string 根据关键字string查找安装包 ``` **删除程序** ```shell yum remove | erase package1 #删除程序包package1 yum groupremove group1 #删除程序组group1 yum deplist package1 #查看程序package1依赖情况 ``` **清除缓存** ```shell yum clean packages # 清除缓存目录下的软件包 yum clean headers # 清除缓存目录下的 headers yum clean oldheaders # 清除缓存目录下旧的 headers ``` **更多实例** ```shell # yum /etc/yum.repos.d/ # yum 源配置文件 vi /etc/yum.repos.d/nginx.repo # 举个栗子: nginx yum源 [nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/6/$basearch/ gpgcheck=0 enabled=1 # yum mirror mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak wget https://mirror.tuna.tsinghua.edu.cn/help/centos/ yum makecache # 添加中文语言支持 LANG=C # 原始语言 LANG=zh_CN.utf8 # 切换到中文 yum groupinstall "Chinese Support" # 添加中文语言支持 ```
上一篇:
ypdomainname
下一篇:
Z