MoonPoint Support Logo

 

Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
December
Sun Mon Tue Wed Thu Fri Sat
22 23 24 25 26 27 28
29 30 31        
2024
Months
Dec


Mon, Jun 24, 2024 10:30 pm

Installing OpenSSH server software on an Ubuntu Linux system

To set up an Ubuntu Linux system as a Secure Shell (SSH) server, you can take the following steps:
  1. Open a terminal window.
  2. In the terminal window, issue the command sudo apt-get install openssh-server.
  3. Enable and start the ssh server service by issuing the command sudo systemctl enable ssh --now. If you wish to enable the service, but not start it immediately, you can omit the --now at the end of the command, i.e., you can use sudo systemctl enable ssh and then later issue the command sudo systemctl start ssh to start the service.

[ More Info ]

[/os/unix/linux/ubuntu] permanent link

Sun, Jun 23, 2024 7:19 pm

Determining the version of an installed package on an Ubuntu Linux system

If you wish to view information for a package installed on an Ubuntu Linux system, you can use the command apt show packageName or dpkg -s packageName where packageName is the name of the relevant package. If you are only interested in the version number for a package, you can pipe the output of either command into the grep command.

$ apt show net-tools
Package: net-tools
Version: 1.60+git20181103.0eebece-1ubuntu5
Priority: optional
Section: net
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: net-tools Team <team+net-tools@tracker.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 819 kB
Depends: libc6 (>= 2.34), libselinux1 (>= 3.1~)
Homepage: http://sourceforge.net/projects/net-tools/
Task: ubuntukylin-desktop
Download-Size: 204 kB
APT-Manual-Installed: yes
APT-Sources: http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
Description: NET-3 networking toolkit
 This package includes the important tools for controlling the network
 subsystem of the Linux kernel.  This includes arp, ifconfig, netstat,
 rarp, nameif and route.  Additionally, this package contains utilities
 relating to particular network hardware types (plipconfig, slattach,
 mii-tool) and advanced aspects of IP configuration (iptunnel, ipmaddr).
 .
 In the upstream package 'hostname' and friends are included. Those are
 not installed by this package, since there is a special "hostname*.deb".

$ apt show net-tools | grep "Version:"

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Version: 1.60+git20181103.0eebece-1ubuntu5
$ dpkg -s net-tools
Package: net-tools
Status: install ok installed
Priority: important
Section: net
Installed-Size: 800
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: foreign
Version: 1.60+git20181103.0eebece-1ubuntu5
Depends: libc6 (>= 2.34), libselinux1 (>= 3.1~)
Description: NET-3 networking toolkit
 This package includes the important tools for controlling the network
 subsystem of the Linux kernel.  This includes arp, ifconfig, netstat,
 rarp, nameif and route.  Additionally, this package contains utilities
 relating to particular network hardware types (plipconfig, slattach,
 mii-tool) and advanced aspects of IP configuration (iptunnel, ipmaddr).
 .
 In the upstream package 'hostname' and friends are included. Those are
 not installed by this package, since there is a special "hostname*.deb".
Homepage: http://sourceforge.net/projects/net-tools/
Original-Maintainer: net-tools Team <team+net-tools@tracker.debian.org>
$ dpkg -s net-tools | grep "Version:"
Version: 1.60+git20181103.0eebece-1ubuntu5
$

Another command that will show you the installed version of a package on a Ubuntu systems is apt-cache policy packageName.

$ apt-cache policy net-tools
net-tools:
  Installed: 1.60+git20181103.0eebece-1ubuntu5
  Candidate: 1.60+git20181103.0eebece-1ubuntu5
  Version table:
 *** 1.60+git20181103.0eebece-1ubuntu5 500
        500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status
$

[/os/unix/linux/ubuntu] permanent link

Sun, May 15, 2016 10:30 pm

apt-get resource temporarily unavailable

When I tried to install a package on an Ubuntu Linux system with apt-get yesterday, I saw the error message below:

$ sudo apt-get install ibmonitor
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

I saw there was another installation in progress via the Update Manager, but the Update Manager update had been running for many days without successfully completing. I couldn't cancel or kill the Update Manager update through the graphical user interface (GUI) for the Update Manager, so I checked for any process identifier (PID) associated with update-manager.

$ ps -ef | grep -i update-manager | grep -v grep
jdoe      4339     1  0  2015 ?        00:02:24 /usr/bin/python /usr/bin/update-manager --no-focus-on-map
jdoe     14331     1  0 Apr17 ?        00:01:21 /usr/bin/python /usr/lib/update-manager/check-new-release-gtk
jdoe     25428     1  0 May01 ?        00:00:39 /usr/bin/python /usr/lib/update-manager/check-new-release-gtk

I killed all three of the processes I found associated with "update-manager", but that still did not allow me to successfully run apt-get.

[ More Info ]

[/os/unix/linux/ubuntu] permanent link

Sat, May 14, 2016 10:54 pm

Creating a simple Debian .deb package

Versions of Linux based on the Debian distribution, such as Ubuntu, use .deb files for the package management system. Debian .deb packages are standard Unix ar archives that include two tar archives, which may optionally be compressed with gzip (zlib), Bzip2, the Lempel–Ziv–Markov chain algorithm (LZMA), or xz (lzma2). One of the two archives holds the control information and the other contains the program data. At the base of the software management system is dpkg; dpkg originally stood for "Debian package". dpkg is a low-level tool that is used by other package management tools such as Advanced Package Tool (APT). APT was originally designed as a front end to dpkg. In turn aptitude, which allows a user to interactively choose packages to install or remove, is a front end to apt. Synaptic provides a graphical user interface (GUI) for apt.

To install a .deb package with dpkg, you can use dpkg -i debFileName . You can obtain a list of the installed packages on a system with dpkg -l or dpkg -l [optional pattern] to filter the list of packages shown by an optional pattern.

I've never created a .deb package and was curious as to how to do so. I thought I'd start with something simple by creating a .deb package for ibmonitor, since the program is just one Perl script. To build the package, I followed the instructions in the How to Build section of Debian Packages.

[ More Info ]

[/os/unix/linux/ubuntu] permanent link

Mon, Apr 11, 2016 11:00 pm

groff can't find DESC file

When I want to convert a man page to an HTML file on an OS X or Linux system, I pipe the man page file into groff - see Converting a man page to HTML, PDF, text. I've used groff for that purpose on CentOS, but, when I tried that technique today on two Ubuntu Linux systems, I received the same "groff: can't find `DESC' file" error message on both, which was followed by "groff:fatal error: invalid device `html' (try installing the `groff' package?)" Both systems were running 12.04 LTS (Precise Pangolin). I was able to resolve the problem by installing the groff package with apt-get.

[ More Info ]

[/os/unix/linux/ubuntu] permanent link

Mon, Mar 14, 2016 10:39 pm

Correcting an issue with the touchpad not working under Ubuntu 12.04

When I booted an eMachines 250-1162 netbook running Ubuntu 12.04 today, I was able to tab between fields on a webpage, but the touchpad was not working - I could not move the mouse pointer. I hit the Ctrl-Alt-F2 keys simultaneously to obtain a console window where I entered the following command:
$ gksudo modprobe -r psmouse

(gksudo:2607): Gtk-WARNING **: cannot open display:

I then switched back to the graphical user interface (GUI) console by hitting Ctrl-Alt-F7. I was then able to move the mouse pointer using the touchpad.

References:

  1. Resetting the mouse in Ubuntu
    Date: August 1, 2015
    MoonPoint Support

[/os/unix/linux/ubuntu] permanent link

Fri, Aug 07, 2015 7:21 pm

Obtaining hard disk drive and optical drive information on an Ubuntu system

On a Ubuntu Linux system, you can determine the hard disk drive (HDD) serial number, disk capacity, and manufacturer with the command sudo lshw -class disk:

$ sudo lshw -class disk
[sudo] password for jdoe: 
  *-disk                  
       description: ATA Disk
       product: QUANTUM FIREBALL
       vendor: Quantum
       physical id: 0
       bus info: scsi@0:0.0.0
       logical name: /dev/sda
       version: A35.
       serial: 186021137091
       size: 27GiB (30GB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 signature=59915410
  *-cdrom
       description: SCSI CD-ROM
       physical id: 1
       bus info: scsi@1:0.0.0
       logical name: /dev/cdrom
       logical name: /dev/sr0
       capabilities: audio
       configuration: status=nodisc
$

You can obtain information on an optical drive, such as a CD-ROM or DVD drive using the dmesg command. Piping the output to egrep allows you to filter out extraneous data.

$ dmesg | egrep -i 'cdrom|dvd|cd/rw|writer'
[    1.183545] sr0: scsi3-mmc drive: 48x/48x cd/rw xa/form2 cdda tray
[    1.183556] cdrom: Uniform CD-ROM driver Revision: 3.20
$

From the above output, I can see the read and write speed for the CD/RW drive in the system is 48 speed.

You can also obtain the speed of the drive by examining the contents of /proc/sys/dev/cdrom/info.

$ cat /proc/sys/dev/cdrom/info
CD-ROM information, Id: cdrom.c 3.20 2003/12/17

drive name:		sr0
drive speed:		48
drive # of slots:	1
Can close tray:		1
Can open tray:		1
Can lock tray:		1
Can change speed:	1
Can select disk:	0
Can read multisession:	1
Can read MCN:		1
Reports media changed:	1
Can play audio:		1
Can write CD-R:		0
Can write CD-RW:	0
Can read DVD:		0
Can write DVD-R:	0
Can write DVD-RAM:	0
Can read MRW:		1
Can write MRW:		1
Can write RAM:		1


$

You can obtain the manufacturer and model number for a CD-ROM, CD/RW, or DVD drive using the cd-drive utility from the libcdio-utils package. If it isn't installed, you can install it on an Ubuntu system with sudo apt-get install libcdio-utils.

$ cd-drive
The program 'cd-drive' is currently not installed.  You can install it by typing:
sudo apt-get install libcdio-utils
$ sudo apt-get install libcdio-utils

Once you've installed the package, you can view vendor, model number, and other information for the drive, including functions the drive supports by issuing the command cd-drive.

$ cd-drive
cd-drive version 0.83 i686-pc-linux-gnu
Copyright (c) 2003, 2004, 2005, 2007, 2008, 2011 R. Bernstein
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
The driver selected is GNU/Linux
The default device for this driver is /dev/cdrom

Drivers available...
  GNU/Linux ioctl and MMC driver     
  cdrdao (TOC) disk image driver     
  bin/cuesheet disk image driver     
  Nero NRG disk image driver         

CD-ROM drive supports MMC 3

                       Drive: /dev/cdrom
Vendor                      : HL-DT-ST
Model                       : CD-ROM GCR-8483B
Revision                    : 1.05
Profile List Feature

Core Feature
	ATAPI interface

Morphing Feature
	Operational Change Request/Notification not supported
	Synchronous GET EVENT/STATUS NOTIFICATION supported

Removable Medium Feature
	Tray type loading mechanism
	can eject the medium or magazine via the normal START/STOP command
	can be locked into the Logical Unit

Random Readable Feature

CD Read Feature
	C2 Error pointers are not supported
	CD-Text is supported

Initiator- and Device-directed Power Management Feature

Ability to respond to all commands within a specific time Feature

Vendor-specific code ffde Feature

Hardware                                  : CD-ROM or DVD
Can eject                                 : Yes
Can close tray                            : Yes
Can disable manual eject                  : Yes
Can select juke-box disc                  : No

Can set drive speed                       : No
Can read multiple sessions (e.g. PhotoCD) : Yes
Can hard reset device                     : No

Reading....
  Can read Mode 2 Form 1                  : Yes
  Can read Mode 2 Form 2                  : Yes
  Can read (S)VCD (i.e. Mode 2 Form 1/2)  : Yes
  Can read C2 Errors                      : No
  Can read IRSC                           : Yes
  Can read Media Channel Number (or UPC)  : Yes
  Can play audio                          : Yes
  Can read CD-DA                          : Yes
  Can read CD-R                           : Yes
  Can read CD-RW                          : Yes
  Can read DVD-ROM                        : No

Writing....
  Can write CD-RW                         : No
  Can write DVD-R                         : No
  Can write DVD-RAM                       : No
  Can write DVD-RW                        : No
  Can write DVD+RW                        : No

$

In the above example, I can see the drive model number is GCR-8483B, so can look online for futher information that might be available from the manufacturer, if needed.

Note: all of the above examples were run on a Ubuntu 12.04 LTS system.

[/os/unix/linux/ubuntu] permanent link

Sat, Aug 01, 2015 10:33 pm

Resetting the mouse in Ubuntu

I could no longer move the mouse pointer on an eMachines netbook system running Ubuntu 12.04. I could use Alt-Tab to move between open windows, but could not move the mouse pointer using the touchpad. Using the instructions at Restarting your touchpad/mouse in Ubuntu in simple steps, I used the Alt-F2 key combination to obtain a "run a command" field. I tried gksudo modprobe -r psmouse then hit Alt-F2 again and entered gksudo modprobe psmouse but found no difference. I already had a terminal window open, so I switched to it with Alt-Tab, though you can open one by hitting Alt-F2 and entering gnome-terminal . I entered the command sudo modprobe -r psmouse there and provided my password when prompted. The screen then went black for a moment and I appeared to have been logged off. I provided the login password for my account, hit Alt-F2, typed gnome-terminal, then typed sudo modprobe psmouse. That restored mouse movement using the touchpad, though I did see the message "System program problem detected Do you want to report the problem now?" I chose to report the problem. That led to another window opening with the message "Sorry, Ubuntu 12.04 has experienced an internal error. If you notice further problems, try restarting the computer." When I chose to look at details, I saw the following:

Executable Path
  /usr/bin/Xorg
Package
  xserver-xorg-core 2:1:.11.4-0ubuntu10.13
Problem Type
  Xorg crashed with SIGABRT in raise()
.tmp.uity.support.test.0

A crash report for the incident was placed in /var/crash.

At that point after submitting the report, I decided to reboot.

[/os/unix/linux/ubuntu] permanent link

Thu, Jun 18, 2015 11:19 pm

Viewing information on wireless networks from shell prompt

On an Ubuntu Linux system, you can use the iwconfig command at a shell prompt, i.e., a command line interface, to view information on available networks. Iwconfig is part of the wireless-tools package.

If you are currently connected to a wireless network, you will see something similar to the following, if you run the command with no arguments specified. In the example below, the system is connected to a wifi network that has a service set identification (SSID) of T28J5 at a bit rate of 1 Mbs.

$ iwconfig
lo        no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"T28J5"  
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:1F:90:B2:9F:A4   
          Bit Rate=1 Mb/s   Tx-Power=14 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=70/70  Signal level=-33 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:65   Missed beacon:0

eth0      no wireless extensions.

You can specify a wireless interface to avoid the display of extraneous information for interfaces that are not wireless interfaces, e.g., iwconfig wlan0.

I can see from the above output that the wireless interface supports the 802.11 b, g, and n standards.

The arguments for the command can be seen by issuing the command iwconfig --help at a shell prompt.

$ iwconfig --help
Usage: iwconfig [interface]
                interface essid {NNN|any|on|off}
                interface mode {managed|ad-hoc|master|...}
                interface freq N.NNN[k|M|G]
                interface channel N
                interface bit {N[k|M|G]|auto|fixed}
                interface rate {N[k|M|G]|auto|fixed}
                interface enc {NNNN-NNNN|off}
                interface key {NNNN-NNNN|off}
                interface power {period N|timeout N|saving N|off}
                interface nickname NNN
                interface nwid {NN|on|off}
                interface ap {N|off|auto}
                interface txpower {NmW|NdBm|off|auto}
                interface sens N
                interface retry {limit N|lifetime N}
                interface rts {N|auto|fixed|off}
                interface frag {N|auto|fixed|off}
                interface modulation {11g|11a|CCK|OFDMg|...}
                interface commit 
       Check man pages for more details.

You can also use the iwlist command to display some additional information from a wireless network interface that is not displayed by iwconfig. The main argument is used to select a category of information; iwlist displays in detailed form all information related to this category, including information already shown by iwconfig.

The options, which you can view by typing iwlist --help or just iwlist at a shell prompt, for the command are shown below:

$ iwlist
Usage: iwlist [interface] scanning [essid NNN] [last]
              [interface] frequency 
              [interface] channel 
              [interface] bitrate 
              [interface] rate 
              [interface] encryption 
              [interface] keys 
              [interface] power 
              [interface] txpower 
              [interface] retry 
              [interface] ap 
              [interface] accesspoints 
              [interface] peers 
              [interface] event 
              [interface] auth 
              [interface] wpakeys 
              [interface] genie 
              [interface] modulation

If you are connected to a wireless network already, you can view information on that network by typing ifwlist scan. E.g., in the example below, the system is connected to a wireless network that has a SSID of T28J5, which can support a maximum transmission rate of 54 Mbs.

$ iwlist scan
lo        Interface doesn't support scanning.

wlan0     Scan completed :
          Cell 01 - Address: 00:1F:90:B2:9F:A4
                    Channel:1
                    Frequency:2.412 GHz (Channel 1)
                    Quality=70/70  Signal level=-36 dBm  
                    Encryption key:on
                    ESSID:"T28J5"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
                              11 Mb/s; 12 Mb/s; 18 Mb/s
                    Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
                    Mode:Master
                    Extra:tsf=0000000733f20181
                    Extra: Last beacon: 22940ms ago
                    IE: Unknown: 00055432384A35
                    IE: Unknown: 010882848B0C12961824
                    IE: Unknown: 030101
                    IE: Unknown: 0706555320010B1B
                    IE: Unknown: 200100
                    IE: Unknown: 2A0100
                    IE: Unknown: 32043048606C
                    IE: Unknown: DD0900037F010100200000

eth0      Interface doesn't support scanning.

If you know the designation for the wireless interface in the system, e.g. wlan0 in this case, you can avoid attempting to scan interfaces, such as eth0, which is a wired rather than wireless interface, by specifying the wireless interface when issuing the command, e.g., iwlist wlan0 scan.

$ iwlist wlan0 scan
wlan0     Scan completed :
          Cell 01 - Address: 00:1F:90:B2:9F:A4
                    Channel:1
                    Frequency:2.412 GHz (Channel 1)
                    Quality=70/70  Signal level=-33 dBm  
                    Encryption key:on
                    ESSID:"T28J5"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
                              11 Mb/s; 12 Mb/s; 18 Mb/s
                    Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
                    Mode:Master
                    Extra:tsf=000000075edbf181
                    Extra: Last beacon: 57620ms ago
                    IE: Unknown: 00055432384A35
                    IE: Unknown: 010882848B0C12961824
                    IE: Unknown: 030101
                    IE: Unknown: 0706555320010B1B
                    IE: Unknown: 200100
                    IE: Unknown: 2A0100
                    IE: Unknown: 32043048606C
                    IE: Unknown: DD0900037F010100200000

You can see the current bitrate with iwlist <interface> bitrate.

$ iwlist wlan0 bitrate
wlan0     unknown bit-rate information.
          Current Bit Rate=1 Mb/s

If you are already connected to a wifi network and want to disconnect you can type ifconfig interface down where interface is the designation for the relevant wireless interface, e.g., wlan0. You can see a list of all available interfaces with ifconfig -a. If you don't run the ifconfig wlan down command from the root account or use sudo on a Ubuntu system, you will receive a "permission denied" error message. You can use sudo ifconfig to run the command from an account with sudo privileges.

$ ifconfig wlan0 down
SIOCSIFFLAGS: Permission denied
$ sudo ifconfig wlan0 down
[sudo] password for jdoe:
$

But with the above method, the system may bring the interface back up automatically a few seconds later. You can use the command-line tool nmcli for controlling NetworkManager, instead. To disable the wifi interface, you can use nmcli nm wifi off.

$ nmcli nm wifi off
$

You can re-enable the wifi interface with nmcli nm wifi on. If the system has previously connected to an available wifi network and has the credentials stored to automatically connect to that network, when you issue the nmcli nm wifi on command, it will automatically reconnect to the network.

You can see the current status of the wifi interface with nmcli nm wifi. E.g., if it is enabled, you would see the following:

$ nmcli nm wifi
WIFI      
enabled

If you wish to see a list of the stored wifi networks you can use the nmcli con command, which shows information about NetworkManager's connections. For information on a particular one you can use nmcli con list id identifier, where identifier is the id for the wireless network, e.g., T28J5 or in the example below VA Internet for the guest network at a hospital.

$ nmcli con list id "VA Internet"
connection.id:                          VA Internet
connection.uuid:                        8cd16736-f340-42a8-b103-1b87d24973b9
connection.type:                        802-11-wireless
connection.autoconnect:                 yes
connection.timestamp:                   1434474233
connection.read-only:                   no
connection.permissions:                 
802-11-wireless.ssid:                   'VA Internet'
802-11-wireless.mode:                   infrastructure
802-11-wireless.band:                   not set
802-11-wireless.channel:                0
802-11-wireless.bssid:                  not set
802-11-wireless.rate:                   0
802-11-wireless.tx-power:               0
802-11-wireless.mac-address:            90:4C:E5:2F:6F:2E
802-11-wireless.cloned-mac-address:     not set
802-11-wireless.mac-address-blacklist:  
802-11-wireless.mtu:                    auto
802-11-wireless.seen-bssids:            
802-11-wireless.security:               not set
ipv4.method:                            auto
ipv4.dns:                               
ipv4.dns-search:                        
ipv4.addresses:                         
ipv4.routes:                            
ipv4.ignore-auto-routes:                no
ipv4.ignore-auto-dns:                   no
ipv4.dhcp-client-id:                    not set
ipv4.dhcp-send-hostname:                yes
ipv4.dhcp-hostname:                     not set
ipv4.never-default:                     no
ipv4.may-fail:                          yes
ipv6.method:                            auto
ipv6.dns:                               
ipv6.dns-search:                        
ipv6.addresses:                         
ipv6.routes:                            
ipv6.ignore-auto-routes:                no
ipv6.ignore-auto-dns:                   no
ipv6.never-default:                     no
ipv6.may-fail:                          yes

[/os/unix/linux/ubuntu] permanent link

Tue, May 19, 2015 9:10 pm

Determining if a package is installed under Ubuntu

To determine if a package is installed on a Ubuntu Linux system, you can use the command dpkg -s packagename where packagename is the name of the package.

$ dpkg -s python-software-properties
Package: python-software-properties
Status: install ok installed
Priority: optional
Section: python
Installed-Size: 196
Maintainer: Michael Vogt <michael.vogt@ubuntu.com>
Architecture: all
Source: software-properties
Version: 0.82.7.5
Depends: python2.7, python (>= 2.7.1-0ubuntu2), python (<< 2.8), python-apt (>= 0.6.20ubuntu16), lsb-release, python-gnupginterface, unattended-upgrades, iso-codes, python-pycurl
Description: manage the repositories that you install software from
 This software provides an abstraction of the used apt repositories.
 It allows you to easily manage your distribution and independent software
 vendor software sources.

If a package isn't installed, you will see output similar to the following:

$ dpkg -s linssid
Package `linssid' is not installed and no info is available.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.

You can use the dpkg-query -l command with the wild card character, *, to see a list of packages that match a specified pattern. E.g., to see all packages that begin with python-py:

$ dpkg-query -l 'python-py*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
un  python-pyatspi <none>         (no description available)
ii  python-pyatspi 2.4.0+dfsg-0ub Assistive Technology Service Provider Interf
ii  python-pycurl  7.19.0-4ubuntu Python bindings to libcurl
un  python-pycurl- <none>         (no description available)
un  python-pygment <none>         (no description available)
un  python-pyicu   <none>         (no description available)
ii  python-pyinoti 0.9.2-1        simple Linux inotify Python bindings
un  python-pyinoti <none>         (no description available)
un  python-pylons  <none>         (no description available)

An asterisk, "*", can represent one or more characters. You can also use a question mark, "?", to represent just one instance of any character. E.g.:

$ dpkg-query -l 'xin*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  xinit          1.3.1-1        X server initialisation tool
ii  xinput         1.5.99.1-0ubun Runtime configuration and test of XInput dev
jim@lancelot:~/Documents/blog$ dpkg-query -l 'xin??'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  xinit          1.3.1-1        X server initialisation tool

To get a list of all packages on the system, use dpkg-query -l.

[/os/unix/linux/ubuntu] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo