• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

CentOS / RHEL : How to view the commands executed in yum history command output

by admin

By default when you execute yum history command, you would only see the time and actions (update, install etc.) for the yum packages.

# yum history
.....
ID     | Login user               | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
    22 |  [user1]                | 2017-07-19 21:45 | I, U           |  279 EE
    21 |  [oracle]                | 2017-07-08 14:36 | Install        |    1
    20 |  [oracle]                | 2017-07-08 14:36 | Install        |    1 EE
    19 |  [oracle]                | 2017-07-08 14:35 | Install        |    1 EE
    18 |  [oracle]                | 2017-07-08 00:32 | Install        |    1

To also view the yum commands executed in the out put we need to add history_list_view=cmds entry to /etc/yum.conf file. By default, this parameter is not added in the yum configuration file.

# vi /etc/yum.conf
history_list_view=cmds

If you now check, you can find the commands like “install, update” in the second column. You would also get the options used with the command like –exclude.

# yum history
....
ID     | Command line             | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
    22 | --exclude=kernel*,*relea | 2017-07-19 21:45 | I, U           |  279 EE
    21 | install oracleasmlib-2.0 | 2017-07-08 14:36 | Install        |    1
    20 | install kmod-oracleasm-2 | 2017-07-08 14:36 | Install        |    1 EE
    19 | install oracleasm-suppor | 2017-07-08 14:35 | Install        |    1 EE
    18 | install compat-libcap* - | 2017-07-08 00:32 | Install        |    1

Filed Under: Linux

Some more articles you might also be interested in …

  1. /var/log/chrony Directory Empty in CentOS/RHEL
  2. numactl: command not found
  3. How to configure postifx smtp relay in CentOS/RHEL 5 and 6
  4. ag – The Silver Searcher. Like ack, but aims to be faster (Command Examples)
  5. How to set children-max for udev Service in CentOS/RHEL 7
  6. How to Disable user list on GNOME login screen in CentOS/RHEL 8
  7. update-alternatives Command Examples in Linux
  8. Basic nano Commands (Cheat Sheet)
  9. ntpq Command Examples in Linux
  10. scp Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • “aws sts” Command Examples
  • “aws sqs” Command Examples
  • “aws ses” Command Examples
  • “aws secretsmanager” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright