Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Tuesday, February 12, 2019

Useful Yum commands

Few useful yum commands

  1. yum list installed - Gives a list of already installed packages
  2. yum history list   - Gives a list yum installs. Note that one can install multiple packages and their dependencies in a single invocation. Example, yum install docker-ce, docker-ce-cli
  3. yum history info   - Gives the details of yum invocation for each of the historical entry above.
  4. /var/log/yum.log - also contains log of yum installs
  5. yum list docker-ce --showduplicates | sort -r  - Shows all the versions that are present for docker and sorts them.

To find difference in packages between installs -

  • Before installation - 

rpm -qa --qf '%{NAME}.%{ARCH}\n' | sort > old-installed-rpms.txt

  • After installation - 

rpm -qa --qf '%{NAME}.%{ARCH}\n' | sort > new-installed-rpms.txt

  • Diff - 
diff old-installed-rpms.txt new-installed-rpms.txt | grep '^<'



Thursday, September 18, 2014

tar destination directory


tar by default extract's to the current directory, if that needs to be changed, it can be done by using below -

[rakesh@host2] tar zxvf source.tar -C /your/dest/dir/to/extract

Graphic display in Linux


In Oracle Linux Virtual Box VM, by default the graphic output is disabled. Login as root (su) and edit the file /etc/inittab as shown below

Subsequently from the command prompt run startx to start the graphic display.

It's possible that despite the above changes, errors like below may occur


[bea@vin2 Desktop]$ java -jar wls1036_generic.jar 
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
Unable to instantiate GUI, defaulting to console mode.

Solution:

Login as root and copy and override the .Xauthority from root's home folder to the user's home folder. As a precaution, take a backup of the user's .Xauthority file.


You can check if the graphic display is working or not by running xclock