Posts Tagged ‘debian’

How to change the default text editor in debian

August 31, 2015

sudo update-alternatives –config editor

Advertisements

DEBIAN: Where is preinst, postinst, prerm, and postrm etc are stored AFTER installing the deb package

December 4, 2012

Ever had issues with uninstalling a package due to incorrect entries in prerm or postrm ?  Or do you like to have a look at  preinst, postinst, prerm, and postrm of an installed package?

You can find them here and make any corrections so that you are able to uninstall  the package.

ls /var/lib/dpkg/info/YOURPACKAGENAME

Debian :: Accessing lvm from single user mode

November 9, 2012

We have /usr mounted on lvm,  so it’s tricky to get the commands in
/usr/bin and /usr/sbin to work in single user mode. lvm devices wont
be loded by default.

lvm vgscan
lvm vgchange -ay
lvm lvs

Now you should see your normal LVM devices in /dev (example:
/dev/LVM-GROUP/LVM-VOLUME) . You can mount and use them.

How to find out which repository a package would be downloaded from – debian/ubuntu

June 12, 2012

apt-cache policy

Change Hostname Permanently on Debian or Ubuntu

February 10, 2008

Debian based systems use the file /etc/hostname to read the hostname of the computer at boot time and set it up using the init script /etc/init.d/hostname.sh

We can edit the file /etc/hostname and change the hostname and then run:

/etc/init.d/hostname.sh start

Steps:

1. sudo gedit /etc/hostname
2. Save the file with the hostname you like to set
3. sudo /etc/init.d/hostname.sh start

Ref: http://sysblogd.com/50/change-hostname-permanently-on-debian-or-ubuntu.htm