Pages1

Linux- How to: Edit password, group

user vipw command for the purpose. man page listing is below. vipw is system command

VIPW(8)                                                  System Management Commands                                                  VIPW(8)

NAME
       vipw, vigr - edit the password, group, shadow-password or shadow-group file

SYNOPSIS
       vipw [options]

       vigr [options]

DESCRIPTION
       The vipw and vigr commands edits the files /etc/passwd and /etc/group, respectively. With the -s flag, they will edit the shadow
       versions of those files, /etc/shadow and /etc/gshadow, respectively. The programs will set the appropriate locks to prevent file
       corruption. When looking for an editor, the programs will first try the environment variable $VISUAL, then the environment variable
       $EDITOR, and finally the default editor, vi(1).

OPTIONS
       The options which apply to the vipw and vigr commands are:

       -g, --group
           Edit group database.

       -h, --help
           Display help message and exit.

       -p, --passwd
           Edit passwd database.

       -q, --quiet
           Quiet mode.

       -s, --shadow
           Edit shadow or gshadow database.

ENVIRONMENT
       VISUAL
           Editor to be used.

       EDITOR
           Editor to be used if VISUAL is not setENVIRONMENT
       VISUAL
           Editor to be used.

       EDITOR
           Editor to be used if VISUAL is not set.

FILES
       /etc/group
           Group account information.

       /etc/gshadow
           Secure group account information.

       /etc/passwd
           User account information.

       /etc/shadow
           Secure user account information.

SEE ALSO
       vi(1), group(5), gshadow(5) , passwd(5), , shadow(5).

LINUX How to: Add user in sudoer list

While working on UBUNTU  your may incur in a situation where you need to login as root to execute some task.  When you login as sudo you may get error like: "you are not sudoer list". This ideally due to reason  that when you are trying to log for first time, root as a user is not enabled. Do make root as user ans to enable logging as root.  One has to activate root account in new UBUNTU  machine it is not activated by default. 
Execute command to activate root and set password
sudo passwd root
How to add user in sudoer list, is common problem new linux user faces.
Here is answer of this question.
vikram@vikram-Satellite-C640:~$ sudo ls -l  /etc/sudoers
-r--r----- 1 root root 723 Jan 31  2012 /etc/sudoers
vikram@vikram-Satellite-C640:~$ sudo vi /etc/sudoers
 vikram@vikram-Satellite-C640:~$ sudo visudo 
  GNU nano 2.2.6                                 File: /etc/sudoers.tmp                                                                         

#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d







                                                               [ Read 29 lines ]
^G Get Help             ^O WriteOut             ^R Read File            ^Y Prev Page            ^K Cut Text             ^C Cur Pos
^X Exit                 ^J Justify              ^W Where Is             ^V Next Page            ^U UnCut Text           ^T To Spell
 

vikram@vikram-Satellite-C640:~$ sudo visudo
and add below line press CTRL +X to and "Y" to save the file. Please check the file name prior to pressing "Y" file name should ideally be "/etc/sudoers"
If file successfully over written it means command your saved is fine. 

 user ALL=(ALL)ALL 
 visudo usually parse the command you are saving against any error otherwise it you will not be able to save.

Now adding a user is sudoer list is done :)

To learn more about visudo you can open man page of visduo. Below is the man page listing
 VISUDO(8)                                                   MAINTENANCE COMMANDS                                                   VISUDO(8)

NAME
       visudo - edit the sudoers file

SYNOPSIS
       visudo [-chqsV] [-f sudoers]

DESCRIPTION
       visudo edits the sudoers file in a safe fashion, analogous to vipw(8).  visudo locks the sudoers file against multiple simultaneous
       edits, provides basic sanity checks, and checks for parse errors.  If the sudoers file is currently being edited you will receive a
       message to try again later.

       There is a hard-coded list of one or more editors that visudo will use set at compile-time that may be overridden via the editor
       sudoers Default variable.  This list defaults to "/usr/local/bin/vi".  Normally, visudo does not honor the VISUAL or EDITOR
       environment variables unless they contain an editor in the aforementioned editors list.  However, if visudo is configured with the
       --with-env-editor option or the env_editor Default variable is set in sudoers, visudo will use any the editor defines by VISUAL or
       EDITOR.  Note that this can be a security hole since it allows the user to execute any program they wish simply by setting VISUAL or
       EDITOR.

       visudo parses the sudoers file after the edit and will not save the changes if there is a syntax error.  Upon finding an error,
       visudo will print a message stating the line number(s) where the error occurred and the user will receive the "What now?" prompt.  At
       this point the user may enter "e" to re-edit the sudoers file, "x" to exit without saving the changes, or "Q" to quit and save
       changes.  The "Q" option should be used with extreme care because if visudo believes there to be a parse error, so will sudo and no
       one will be able to sudo again until the error is fixed.  If "e" is typed to edit the  sudoers file after a parse error has been
       detected, the cursor will be placed on the line where the error occurred (if the editor supports this feature).

OPTIONS
       visudo accepts the following command line options:

       -c          Enable check-only mode.  The existing sudoers file will be checked for syntax and a message will be printed to the
                   standard output detailing the status of sudoers.  If the syntax check completes successfully, visudo will exit with a
                   value of 0.  If a syntax error is encountered, visudo will exit with a value of 1.

       -f sudoers  Specify and alternate sudoers file location.  With this option visudo will edit (or check) the sudoers file of your
                   choice, instead of the default, /etc/sudoers.  The lock file used is the specified sudoers file with ".tmp" appended to
                   it.  In check-only mode only, the argument to -f may be "-", indicating that sudoers will be read from the standard
                   input.

       -h          The -h (help) option causes visudo to print a short help message to the standard output and exit.
       -q          Enable quiet mode.  In this mode details about syntax errors are not printed.  This option is only useful when combined
                   with the -c option.

       -s          Enable strict checking of the sudoers file.  If an alias is used before it is defined, visudo will consider this a parse
                   error.  Note that it is not possible to differentiate between an alias and a host name or user name that consists solely
                   of uppercase letters, digits, and the underscore ('_') character.

       -V          The -V (version) option causes visudo to print its version number and exit.

ENVIRONMENT
       The following environment variables may be consulted depending on the value of the editor and env_editor sudoers variables:

       VISUAL          Invoked by visudo as the editor to use

       EDITOR          Used by visudo if VISUAL is not set

FILES
       /etc/sudoers            List of who can run what

       /etc/sudoers.tmp        Lock file for visudo

DIAGNOSTICS
       sudoers file busy, try again later.
           Someone else is currently editing the sudoers file.

       /etc/sudoers.tmp: Permission denied
           You didn't run visudo as root.

       Can't find you in the passwd database
           Your userid does not appear in the system passwd file.

       Warning: {User,Runas,Host,Cmnd}_Alias referenced but not defined
           Either you are trying to use an undeclare {User,Runas,Host,Cmnd}_Alias or you have a user or host name listed that consists
           solely of uppercase letters, digits, and the underscore ('_') character.  In the latter case, you can ignore the warnings (sudo
           will not complain).  In -s (strict) mode these are errors, not warnings.

       Warning: unused {User,Runas,Host,Cmnd}_Alias
           The specified {User,Runas,Host,Cmnd}_Alias was defined but never used.  You may wish to comment out or remove the unused alias.
           In -s (strict) mode this is an error, not a warning.
       -q          Enable quiet mode.  In this mode details about syntax errors are not printed.  This option is only useful when combined
                   with the -c option.

       -s          Enable strict checking of the sudoers file.  If an alias is used before it is defined, visudo will consider this a parse
                   error.  Note that it is not possible to differentiate between an alias and a host name or user name that consists solely
                   of uppercase letters, digits, and the underscore ('_') character.

       -V          The -V (version) option causes visudo to print its version number and exit.

ENVIRONMENT
       The following environment variables may be consulted depending on the value of the editor and env_editor sudoers variables:

       VISUAL          Invoked by visudo as the editor to use

       EDITOR          Used by visudo if VISUAL is not set

FILES
       /etc/sudoers            List of who can run what

       /etc/sudoers.tmp        Lock file for visudo

DIAGNOSTICS
       sudoers file busy, try again later.
           Someone else is currently editing the sudoers file.

       /etc/sudoers.tmp: Permission denied
           You didn't run visudo as root.

       Can't find you in the passwd database
           Your userid does not appear in the system passwd file.

       Warning: {User,Runas,Host,Cmnd}_Alias referenced but not defined
           Either you are trying to use an undeclare {User,Runas,Host,Cmnd}_Alias or you have a user or host name listed that consists
           solely of uppercase letters, digits, and the underscore ('_') character.  In the latter case, you can ignore the warnings (sudo
           will not complain).  In -s (strict) mode these are errors, not warnings.

       Warning: unused {User,Runas,Host,Cmnd}_Alias
           The specified {User,Runas,Host,Cmnd}_Alias was defined but never used.  You may wish to comment out or remove the unused alias.
           In -s (strict) mode this is an error, not a warning.






Login as "Su" in new ubuntu machines: you are not in sudoer list

While working on UBUNTU  your may incur in a situation where you need to login as root to execute some task.  When you login as sudo you may get error like: "you are not sudoer list". This ideally due to reason  that when you are trying to log for first time, root as a user is not enabled. Do make root as user ans to enable logging as root.  One has to activate root account in new UBUNTU  machine it is not activated by default. 
Execute command to activate root and set password
sudo passwd root
Once password setting successful then one can go ahead to login a root by executing command below. 
su root

Exporting Library path

Command to export library path:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/>my_lib>/path.so

To export permanently:
export LD_LIBRARY_PATH=/usr/local/lib   into /etc/bash.profile


UBUNTU: Command axi-cache to list depenedencies of packages

Man:
AXI-CACHE(1)                                               User Commands                                              AXI-CACHE(1)

NAME
       axi-cache - query the Apt Xapian Index

SYNOPSIS
       axi-cache [options] command [args]

DESCRIPTION
       Query the Apt Xapian index.

   Commands:
              search commands:

       axi-cache again [query]
              repeat the last search, possibly adding query terms

       axi-cache help
              show a summary of commands

       axi-cache info
              print information about the apt-xapian-index environment

       axi-cache last [count]
              show the last results again

       axi-cache more [count]
              show more terms from the last search

       axi-cache rdetails pkgname[s]
              show details of reverse relationships for the given packages

       axi-cache search [terms]
              start a new search

              apt-cache front-ends:

       axi-cache depends pkgname[s]
              run apt-cache depends pkgname[s]

       axi-cache madison pkgname[s]
              run apt-cache madison pkgname[s]

       axi-cache policy pkgname[s]
              run apt-cache policy pkgname[s]

       axi-cache rdepends pkgname[s]
              run apt-cache rdepends pkgname[s]

       axi-cache show pkgname[s]
              run apt-cache show pkgname[s]

       axi-cache showpkg pkgname[s]
              run apt-cache showpkg pkgname[s]

OPTIONS
       --version
              show program's version number and exit

       -h, --help
              show this help message and exit

       -s SORT, --sort=SORT
              sort by the given value, as listed in /var/lib/apt-xapian-index/values. Add a '-' to reverse sort order

       --tags show matching tags, rather than packages

       --tabcomplete=TYPE
              suggest words for tab completion of the current command line (type is 'plain' or 'partial')

       --last use 'show --last' to limit tab completion to only the packages from the last search results

       --all  disable  pagination  and  always show all results. Note that search results are normally sorted by relevance, so you
              may find meaningless results at the end of the output

axi-cache 0.44                                            September 2013                                              AXI-CACHE(1)
 Manual page axi-cache(1) line 28/83 (END) (press h for help or q to quit)

--------------------------------------------------------

vikram@vikram-Veriton-Series:~$ axi-cache depends vimvim
  Depends: vim-common
  Depends: vim-runtime
  Depends: libacl1
  Depends: libc6
  Depends: libgpm2
  Depends: libpython2.7
  Depends: libselinux1
  Depends: libtinfo5
  Suggests: <ctags>
    exuberant-ctags
  Suggests: vim-doc
  Suggests: vim-scripts





Another example to list dependencies:
vikram@vikram-Veriton-Series:~$ axi-cache depends qt-sdk
qt-sdk
  Depends: build-essential
  Depends: cmake
  Depends: gdb
  Depends: git-core
    git
  Depends: libqt4-dev
  Depends: libqt4-opengl-dev
  Depends: libphonon-dev
  Depends: qt4-designer
  Depends: qt4-dev-tools
  Depends: qt4-doc
  Depends: qt4-doc-html
  Depends: qt4-qmake
  Depends: qtcreator
  Depends: qtcreator-doc
  Depends: subversion
  Depends: libqtwebkit-dev
  Suggests: libqt4-dbg
  Suggests: libqt4-webkit-dbg
  Suggests: libqt4-xmlpatterns-dbg
------------------------------------------------------

UBUNTU: adding CD-ROM in sources.list

In UBUNTU one has to rely on source.lst for fetching various available updates and interns upgrade. Once modify source.lst file with while running as sudo.

source.lst can be found at "/etc/apt/sources.list"
---------------Content of source.lst ----------------------------------------------------------------
 deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release i386 (20120423)]/ precise main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://in.archive.ubuntu.com/ubuntu/ precise main restricted
deb-src http://in.archive.ubuntu.com/ubuntu/ precise main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://in.archive.ubuntu.com/ubuntu/ precise-updates main restricted
deb-src http://in.archive.ubuntu.com/ubuntu/ precise-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://in.archive.ubuntu.com/ubuntu/ precise universe
deb-src http://in.archive.ubuntu.com/ubuntu/ precise universe
deb http://in.archive.ubuntu.com/ubuntu/ precise-updates universe
deb-src http://in.archive.ubuntu.com/ubuntu/ precise-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://in.archive.ubuntu.com/ubuntu/ precise multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ precise multiverse
deb http://in.archive.ubuntu.com/ubuntu/ precise-updates multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ precise-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://in.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu precise-security main restricted
deb-src http://security.ubuntu.com/ubuntu precise-security main restricted
deb http://security.ubuntu.com/ubuntu precise-security universe
deb-src http://security.ubuntu.com/ubuntu precise-security universe
deb http://security.ubuntu.com/ubuntu precise-security multiverse
deb-src http://security.ubuntu.com/ubuntu precise-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
deb http://us.archive.ubuntu.com/ubuntu/ saucy universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ saucy universe multiverse
-------------------------------------------------------------------------------------------------------------------

If one has to fetch update from particular website which offer packages for UBUNTU that can be added in this source.lst file and the one can execute below commands:

sudo apt-get update 
sudo apt-get upgrade

To proceed further suppose you have CD-ROM with which you believe can upgrade your system. your add that CD-ROM in source.lst. To perform this
one has to look into "apt-cdrom" command:

vikram@vikram-Veriton-Series:~$ apt-cdrom
apt 0.8.16~exp12ubuntu10.16 for i386 compiled on Nov 15 2013 15:33:51
Usage: apt-cdrom [options] command

apt-cdrom is a tool to add CDROM's to APT's source list. The
CDROM mount point and device information is taken from apt.conf
and /etc/fstab.


Commands:
   add - Add a CDROM
   ident - Report the identity of a CDROM

Options:
  -h   This help text
  -d   CD-ROM mount point
  -r   Rename a recognized CD-ROM
  -m   No mounting
  -f   Fast mode, don't check package files
  -a   Thorough scan mode
  --auto-detect Auto detect drive and mount point
  -c=? Read this configuration file
  -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp
See fstab(5)

UBUNTU: Using "apt-cache" command for vraious package information

Apt-cahche command offers various services related to information of installed packages:

vikram@vikram-Veriton-Series:~$ apt-cache apt 0.8.16~exp12ubuntu10.16 for i386 compiled on Nov 15 2013 15:33:41
Usage: apt-cache [options] command
       apt-cache [options] showpkg pkg1 [pkg2 ...]
       apt-cache [options] showsrc pkg1 [pkg2 ...]

apt-cache is a low-level tool used to query information
from APT's binary cache files

Commands:
   gencaches - Build both the package and source cache
   showpkg - Show some general information for a single package
   showsrc - Show source records
   stats - Show some basic statistics
   dump - Show the entire file in a terse form
   dumpavail - Print an available file to stdout
   unmet - Show unmet dependencies
   search - Search the package list for a regex pattern
   show - Show a readable record for the package
   depends - Show raw dependency information for a package
   rdepends - Show reverse dependency information for a package
   pkgnames - List the names of all packages in the system
   dotty - Generate package graphs for GraphViz
   xvcg - Generate package graphs for xvcg
   policy - Show policy settings

--------------------------------------------------------------------- 
Exploring various command offering by apt-cache
 
Using APT-Cache command to list dependency of particular pakages:
---------------------------------------------------------------
vikram@vikram-Veriton-Series:~$ apt-c
apt-cache   apt-cdrom   apt-config 
vikram@vikram-Veriton-Series:~$ apt-cache
apt 0.8.16~exp12ubuntu10.16 for i386 compiled on Nov 15 2013 15:33:41
Usage: apt-cache [options] command
       apt-cache [options] showpkg pkg1 [pkg2 ...]
       apt-cache [options] showsrc pkg1 [pkg2 ...]

apt-cache is a low-level tool used to query information
from APT's binary cache files

Commands:
   gencaches - Build both the package and source cache
   showpkg - Show some general information for a single package
   showsrc - Show source records
   stats - Show some basic statistics
   dump - Show the entire file in a terse form
   dumpavail - Print an available file to stdout
   unmet - Show unmet dependencies
   search - Search the package list for a regex pattern
   show - Show a readable record for the package
   depends - Show raw dependency information for a package
   rdepends - Show reverse dependency information for a package
   pkgnames - List the names of all packages in the system
   dotty - Generate package graphs for GraphViz
   xvcg - Generate package graphs for xvcg
   policy - Show policy settings

Options:
  -h   This help text.
  -p=? The package cache.
  -s=? The source cache.
  -q   Disable progress indicator.
  -i   Show only important deps for the unmet command.
  -c=? Read this configuration file
  -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp
See the apt-cache(8) and apt.conf(5) manual pages for more information.
vikram@vikram-Veriton-Series:~$ apt-cache qt
E: Invalid operation qt
vikram@vikram-Veriton-Series:~$ apt-cache qt4
E: Invalid operation qt4
vikram@vikram-Veriton-Series:~$ apt-cache showpkg qt
Display all 161 possibilities? (y or n)
vikram@vikram-Veriton-Series:~$ apt-cache showpkg qt4-
qt4-bin-dbg         qt4-demos-dbg       qt4-dev-tools       qt4-doc-html        qt4-qmake           qt4-qtconfig
qt4-demos           qt4-designer        qt4-doc             qt4-linguist-tools  qt4-qmlviewer      
vikram@vikram-Veriton-Series:~$ apt-cache showpkg qt4-
qt4-bin-dbg         qt4-demos-dbg       qt4-dev-tools       qt4-doc-html        qt4-qmake           qt4-qtconfig
qt4-demos           qt4-designer        qt4-doc             qt4-linguist-tools  qt4-qmlviewer      
vikram@vikram-Veriton-Series:~$ apt-cache showpkg qt4-de
qt4-demos      qt4-demos-dbg  qt4-designer   qt4-dev-tools 
vikram@vikram-Veriton-Series:~$ apt-cache showpkg qt4-de
qt4-demos      qt4-demos-dbg  qt4-designer   qt4-dev-tools 
vikram@vikram-Veriton-Series:~$ apt-cache showpkg qt4-de
qt4-demos      qt4-demos-dbg  qt4-designer   qt4-dev-tools 
vikram@vikram-Veriton-Series:~$ apt-cache showpkg qt4-de
qt4-demos      qt4-demos-dbg  qt4-designer   qt4-dev-tools 
vikram@vikram-Veriton-Series:~$ apt-cache showpkg qt4-dev-tools
Package: qt4-dev-tools
Versions:
4:4.8.1-0ubuntu4.8 (/var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_precise-updates_main_binary-i386_Packages)
 Description Language:
                 File: /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages
                  MD5: 17ebce770464288a466f921228f3f8f3
 Description Language: en
                 File: /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_precise_main_i18n_Translation-en
                  MD5: 17ebce770464288a466f921228f3f8f3

4:4.8.1-0ubuntu4.6 (/var/lib/dpkg/status)
 Description Language:
                 File: /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages
                  MD5: 17ebce770464288a466f921228f3f8f3
 Description Language: en
                 File: /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_precise_main_i18n_Translation-en
                  MD5: 17ebce770464288a466f921228f3f8f3

4:4.8.1-0ubuntu4.5 (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_main_binary-i386_Packages)
 Description Language:
                 File: /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages
                  MD5: 17ebce770464288a466f921228f3f8f3
 Description Language: en
                 File: /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_precise_main_i18n_Translation-en
                  MD5: 17ebce770464288a466f921228f3f8f3

4:4.8.1-0ubuntu4 (/var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages)
 Description Language:
                 File: /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages
                  MD5: 17ebce770464288a466f921228f3f8f3
 Description Language: en
                 File: /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_precise_main_i18n_Translation-en
                  MD5: 17ebce770464288a466f921228f3f8f3


Reverse Depends:
  qt4-designer,qt4-dev-tools 4.0.1-2

apt-cache policy qt4-dev-tools  qt4-designer,qt4-dev-tools 4.0.1-2
  qt4-doc,qt4-dev-tools
  qt4-demos,qt4-dev-tools 4:4.8.1-0ubuntu4.6
  libqt4-dev,qt4-dev-tools
  qtikz,qt4-dev-tools
  qtcreator-doc,qt4-dev-tools
  qt-assistant-compat,qt4-dev-tools 4:4.7.0~
  qt-assistant-compat,qt4-dev-tools 4:4.7.0~
  qmf-doc-html,qt4-dev-tools
  qmf-doc,qt4-dev-tools
  pcp-gui,qt4-dev-tools
  paraview-dev,qt4-dev-tools 4.3.3-2
  paraview-dev,qt4-dev-tools
  libsoqt4-dev,qt4-dev-tools
  libcgal-demo,qt4-dev-tools
  kubuntu-full,qt4-dev-tools
  freecad-doc,qt4-dev-tools
  eric,qt4-dev-tools
  qt4-doc,qt4-dev-tools
  qt4-designer,qt4-dev-tools 4.0.1-2
  qt4-designer,qt4-dev-tools 4.0.1-2
  qt4-demos,qt4-dev-tools 4:4.8.1-0ubuntu4.5
  libqt4-dev,qt4-dev-tools
  qtcreator-doc,qt4-dev-tools
  qtcreator,qt4-dev-tools
  paraview-dev,qt4-dev-tools 4.3.3-2
  paraview-dev,qt4-dev-tools
  paraview,qt4-dev-tools
  qt4-doc,qt4-dev-tools
  qt4-designer,qt4-dev-tools 4.0.1-2
  qt4-designer,qt4-dev-tools 4.0.1-2
  qt4-demos,qt4-dev-tools 4:4.8.1-0ubuntu4.8
  libqt4-dev,qt4-dev-tools
  libcgal-demo,qt4-dev-tools
  source-highlight-ide,qt4-dev-tools
  qtikz,qt4-dev-tools
  qtcreator-doc,qt4-dev-tools
  qtcreator,qt4-dev-tools
  qt-sdk,qt4-dev-tools
  qt-assistant-compat,qt4-dev-tools 4:4.7.0~
  qt-assistant-compat,qt4-dev-tools 4:4.7.0~
  qsource-highlight,qt4-dev-tools
  qmf-doc-html,qt4-dev-tools
  qmf-doc,qt4-dev-tools
  qdevelop,qt4-dev-tools
  pcp-gui,qt4-dev-tools
  pcp-doc,qt4-dev-tools
  paraview-dev,qt4-dev-tools 4.3.3-2
  paraview-dev,qt4-dev-tools
  paraview,qt4-dev-tools
  libsoqt4-dev,qt4-dev-tools
  freecad-doc,qt4-dev-tools
  eric,qt4-dev-tools
  qt4-doc,qt4-dev-tools
  qt4-designer,qt4-dev-tools 4.0.1-2
  qt4-designer,qt4-dev-tools 4.0.1-2
  qt4-demos,qt4-dev-tools 4:4.8.1-0ubuntu4
  libqt4-dev,qt4-dev-tools
  kubuntu-full,qt4-dev-tools
Dependencies:
4:4.8.1-0ubuntu4.8 - libqt4-sql-sqlite (0 (null)) libc6 (2 2.4) libgcc1 (2 1:4.1.1) libpng12-0 (2 1.2.13-4) libqt4-dbus (5 4:4.8.1-0ubuntu4.8) libqt4-declarative (5 4:4.8.1-0ubuntu4.8) libqt4-help (5 4:4.8.1-0ubuntu4.8) libqt4-xml (5 4:4.8.1-0ubuntu4.8) libqt4-xmlpatterns (5 4:4.8.1-0ubuntu4.8) libqtcore4 (5 4:4.8.1-0ubuntu4.8) libqtgui4 (5 4:4.8.1-0ubuntu4.8) libstdc++6 (2 4.4.0) libx11-6 (0 (null)) libxtst6 (0 (null)) qt4-doc-html (0 (null)) libqt4-dev (0 (null)) qt4-designer (0 (null)) qt4-doc (0 (null)) qt3-dev-tools-embedded (0 (null)) libqt4-core (3 4.4.0~beta1-1) libqt4-core (3 4.4.0~beta1-1)
4:4.8.1-0ubuntu4.6 - libqt4-sql-sqlite (0 (null)) libc6 (2 2.4) libgcc1 (2 1:4.1.1) libpng12-0 (2 1.2.13-4) libqt4-dbus (5 4:4.8.1-0ubuntu4.6) libqt4-declarative (5 4:4.8.1-0ubuntu4.6) libqt4-help (5 4:4.8.1-0ubuntu4.6) libqt4-xml (5 4:4.8.1-0ubuntu4.6) libqt4-xmlpatterns (5 4:4.8.1-0ubuntu4.6) libqtcore4 (5 4:4.8.1-0ubuntu4.6) libqtgui4 (5 4:4.8.1-0ubuntu4.6) libstdc++6 (2 4.4.0) libx11-6 (0 (null)) libxtst6 (0 (null)) qt4-doc-html (0 (null)) libqt4-dev (0 (null)) qt4-designer (0 (null)) qt4-doc (0 (null)) qt3-dev-tools-embedded (0 (null)) libqt4-core (3 4.4.0~beta1-1) libqt4-core (3 4.4.0~beta1-1)
4:4.8.1-0ubuntu4.5 - libqt4-sql-sqlite (0 (null)) libc6 (2 2.4) libgcc1 (2 1:4.1.1) libpng12-0 (2 1.2.13-4) libqt4-dbus (5 4:4.8.1-0ubuntu4.5) libqt4-declarative (5 4:4.8.1-0ubuntu4.5) libqt4-help (5 4:4.8.1-0ubuntu4.5) libqt4-xml (5 4:4.8.1-0ubuntu4.5) libqt4-xmlpatterns (5 4:4.8.1-0ubuntu4.5) libqtcore4 (5 4:4.8.1-0ubuntu4.5) libqtgui4 (5 4:4.8.1-0ubuntu4.5) libstdc++6 (2 4.4.0) libx11-6 (0 (null)) libxtst6 (0 (null)) qt4-doc-html (0 (null)) libqt4-dev (0 (null)) qt4-designer (0 (null)) qt4-doc (0 (null)) qt3-dev-tools-embedded (0 (null)) libqt4-core (3 4.4.0~beta1-1) libqt4-core (3 4.4.0~beta1-1)
4:4.8.1-0ubuntu4 - libqt4-sql-sqlite (0 (null)) libc6 (2 2.4) libgcc1 (2 1:4.1.1) libpng12-0 (2 1.2.13-4) libqt4-dbus (5 4:4.8.1-0ubuntu4) libqt4-declarative (5 4:4.8.1-0ubuntu4) libqt4-help (5 4:4.8.1-0ubuntu4) libqt4-xml (5 4:4.8.1-0ubuntu4) libqt4-xmlpatterns (5 4:4.8.1-0ubuntu4) libqtcore4 (5 4:4.8.1-0ubuntu4) libqtgui4 (5 4:4.8.1-0ubuntu4) libstdc++6 (2 4.4.0) libx11-6 (0 (null)) libxtst6 (0 (null)) qt4-doc-html (0 (null)) libqt4-dev (0 (null)) qt4-designer (0 (null)) qt4-doc (0 (null)) qt3-dev-tools-embedded (0 (null)) libqt4-core (3 4.4.0~beta1-1) libqt4-core (3 4.4.0~beta1-1)
Provides:
4:4.8.1-0ubuntu4.8 -
4:4.8.1-0ubuntu4.6 -
4:4.8.1-0ubuntu4.5 -
4:4.8.1-0ubuntu4 -
Reverse Provides:
-------------------------------------------------


To get basic description of of packages:

vikram@vikram-Veriton-Series:~$ apt-cache stats qt4-dev-tools
Total package names: 62084 (1,242 k)
Total package structures: 62084 (2,980 k)
  Normal packages: 46697
  Pure virtual packages: 1853
  Single virtual packages: 4080
  Mixed virtual packages: 1241
  Missing: 8213
Total distinct versions: 73982 (4,735 k)
Total distinct descriptions: 104275 (2,503 k)
Total dependencies: 454516 (12.7 M)
Total ver/file relations: 87254 (1,396 k)
Total Desc/File relations: 104275 (1,668 k)
Total Provides mappings: 16315 (326 k)
Total globbed strings: 263 (3,047 )
Total dependency version space: 2,108 k
Total slack space: 58.5 k
Total space accounted for: 22.2 M
vikram@vikram-Veriton-Series:~$ 

--------------------------------------------------------------------




To List out dependency of a package:
vikram@vikram-Veriton-Series:~$ apt-cache depends qt4-dev-tools
qt4-dev-tools
  Depends: libqt4-sql-sqlite
  Depends: libc6
  Depends: libgcc1
  Depends: libpng12-0
  Depends: libqt4-dbus
  Depends: libqt4-declarative
  Depends: libqt4-help
  Depends: libqt4-xml
  Depends: libqt4-xmlpatterns
  Depends: libqtcore4
  Depends: libqtgui4
  Depends: libstdc++6
  Depends: libx11-6
  Depends: libxtst6
  Suggests: qt4-doc-html
  Recommends: libqt4-dev
  Recommends: qt4-designer
  Recommends: qt4-doc
  Conflicts: <qt3-dev-tools-embedded>
  Breaks: libqt4-core
  Replaces: libqt4-core

------------------------------------------------------------------------

Listing out policies of particular package:

vikram@vikram-Veriton-Series:~$ apt-cache policy qt4-dev-tools
qt4-dev-tools:
  Installed: 4:4.8.1-0ubuntu4.6
  Candidate: 4:4.8.1-0ubuntu4.8
  Version table:
     4:4.8.1-0ubuntu4.8 0
        500 http://in.archive.ubuntu.com/ubuntu/ precise-updates/main i386 Packages
 *** 4:4.8.1-0ubuntu4.6 0
        100 /var/lib/dpkg/status
     4:4.8.1-0ubuntu4.5 0
        500 http://security.ubuntu.com/ubuntu/ precise-security/main i386 Packages
     4:4.8.1-0ubuntu4 0
        500 http://in.archive.ubuntu.com/ubuntu/ precise/main i386 Packages


-----------------------------------------------------------------------

finding unmet dependencies
vikram@vikram-Veriton-Series:~$ apt-cache unmet qt4-dev-tools
Package qt4-dev-tools version 4:4.8.1-0ubuntu4.8 has an unmet dep:
 Replaces: libqt4-core (< 4.4.0~beta1-1)

------------------------------------------------------------------
Command: apt-cache search < package name> 
(search - Search the package list for a regex pattern)


vikram@vikram-Veriton-Series:~$ sudo apt-cache search qt4-dev-tools
pyqt4-dev-tools - Development tools for PyQt4
qt4-dev-tools - Qt 4 development tools
qt4-doc - Qt 4 API documentation
freecad-doc - FreeCAD documentation
qmf-doc - Qt Messaging Framework (QMF) - QCH documentation
vikram@vikram-Veriton-Series:~$ 

-------------------------------------------------------------

Listing out Reverse dependency 
Command:apt-cache rdepends < package name>
rdepends - Show reverse dependency information for a package
vikram@vikram-Veriton-Series:~$ sudo apt-cache rdepends qt4-dev-tools
qt4-dev-tools
Reverse Depends:
  qt4-designer
  qt4-designer
  qt4-doc
  qt4-demos
  libqt4-dev
  qtikz
  qtcreator-doc
  qt-assistant-compat
  qt-assistant-compat
  qmf-doc-html
  qmf-doc
  pcp-gui
  paraview-dev
  paraview-dev
  libsoqt4-dev
  libcgal-demo
  kubuntu-full
  freecad-doc
  eric
  qt4-doc
  qt4-designer
  qt4-designer
  qt4-demos
  libqt4-dev
  qtcreator-doc
  qtcreator
  paraview-dev
  paraview-dev
  paraview
  qt4-doc
  qt4-designer
  qt4-designer
  qt4-demos
  libqt4-dev
  libcgal-demo
  source-highlight-ide
  qtikz
  qtcreator-doc
  qtcreator
  qt-sdk
  qt-assistant-compat
  qt-assistant-compat
  qsource-highlight
  qmf-doc-html
  qmf-doc
  qdevelop
  pcp-gui
  pcp-doc
  paraview-dev
  paraview-dev
  paraview
  libsoqt4-dev
  freecad-doc
  eric
  qt4-doc
  qt4-designer
  qt4-designer
  qt4-demos
  libqt4-dev
  kubuntu-full
--------------------------------------------------------------------------------------