Yum in linux with examples

yum in linux with examples
yum in linux with examples

 

Yum in linux with examples

Yum in linux with examples : It is a tutorial which contain details about how to use tool or command yum in Linux with many other options. The full form of YUM is (YELLOWDOG UPDATER MODIFIED). Yum is a command in Linux which is used for updating, installing, removing and managing Linux software repositories in Linux based OS. Yum is also used for searching the information of any package. Sometimes we also use apt-get instead of yum. I will discuss about yum in the other tutorial. Lets see how to use yum in Linux.  I will suggest you to try these command on your Linux system to get hands on practice in these commands.

 

1. To see if the package is available or not

# yum list <package name>
# yum list openssh
yum in linux with examples
yum in linux with examples

 

 

2. To install new package

# yum install <package name>
# yum install wine

yum in linux with examples  

 

3. To update package

# yum update                                 update all the package if available
# yum update openssh                          update the package openssh
yum in linux with examples
yum in linux with examples

 

 

4. To search for particular package

# yum search <pkg name>
# yum search openssh
yum in linux with examples
yum in linux with examples

Also see the tutorial how to use UNIX sed command

5.To get information of any package

# yum info <package name>
# yum info openssh
Yum command in Linux with examples
yum in linux with examples

 

6.To see all the installed packages

# yum list installed

or

# yum list installed | less
Yum command in Linux with examples
yum in linux with examples

 

7. To clean yum cache

Some times you just need to clean the cache of yum command. Use the below command for cleaning yum cache.

# yum clean all

 

8. To list available group package

# yum grouplist
Yum in Linux with examples
yum in linux with examples

 

9. To install group package

# yum groupinstall 'KDE'

 

10. To update a group package

# yum groupupdate 'KDE'
yum in linux with examples
yum in linux with examples

 

11.To remove a group package

In place of 'KDE'  ypu give the name of any package you want to remove. Please be careful while removing any package.

# yum groupremove 'KDE'

 

12. To see yum history

With   'yum history'  command you can see the list of tasks you performed with yum command. For example installing, updating or removing of any package.

# yum history
yum in linux with examples
yum in linux with examples

 

13. To see enabled yum repositories

# yum repolist

yum command

 

14. To see enable and disabled yum repositories

# yum repolist all

yum command

 

15. To install package from disabled repositories

To install any package from disabled repositories, you need to use the following command, Yo have to enable the required repositories. For example here I am enabling the repo 'epel'

# yum --enablerepo=epel install wine

 

16. Perform multiple task at the same time

This is one of my favourite. With this I don't have to wait for one task to complete to start another. Let me explain you with an example. For example you want to install multiple packages at a time. Lets see how to make it easy.

# cat  yum.txt                             create a file yum.txt

 

In line 1 write    install mysql                                                      
In line 2 write    install openssh                                               
In line 3 write    install wine 


then CTRL+D to save the file.   Now to run the installation of the above packages by the text file we will use 'yum shell' command

# yum shell yum.txt

 


This is it with the tutorial Yum in linux with examples. Hope you liked it.

Download Our Free eBook now

Linux and UNIX Shell scripting ebook

2 Comments on Yum in linux with examples

Leave a Reply

Your email address will not be published.


*


shares