Category: Ubuntu
How to rename a user in Linux
Simply issue this command: usermod -m -d /home/new-account-name -l new-account-name old-account-name It creates the home directory if it does not exists. It also copy the stuff of the old user
Read Morepreinst: line 118: a2query: command not found
If you are getting the following errors while trying to install Apache on Trusty (Ubuntu 14.04), execute the commands below and try to re-install it. Preparing to unpack …/apache2_2.4.7-1ubuntu4_amd64.deb …
Read MoreHow To Restore Skype Status Bar Icon In Ubuntu 14.04
After installing Skype on Ubuntu 14.04, there is no icon in the status bar. To restore it, simply execute the following command: sudo apt-get install sni-qt:i386 . This procedure works
Read MoreHow to display the version of Ubuntu you are running
From a terminal window, type in: lsb_release -a
Read MoreHow to prevent SSHD to listen on an address family
It is possible to control on which address family sshd will listen to. In /etc/ssh/sshd_config, simply add AddressFamily any to listen to IPv4 and IPv6 addresses. This is the default.
Read MoreHow to assign a static IP address in Ubuntu
Setting a static IP address in Ubuntu involves editing /etc/network/interfaces. If the interface is currently using DHCP, you will find these lines in the file. auto lan iface lan inet
Read MoreHow to change the network interface name in Ubuntu 12/13
Two files need to be modified to change the name of a network interface in Ubuntu. For example, if you want to change eth0 for lan, simply change the NAME
Read MoreHow to find duplicate files on Linux?
It is pretty straight forward in Linux, install fdupes. sudo apt-get install fdupes Type the following command to display the documentation man fdupes
Read MoreAccessing a serial port from a web server
On most Linux distribution, it is impossible to access a serial port (ex. /dev/ttyS0) from a web server such as Apache or lighttpd using a cgi. Simply add the user
Read MoreScript listing all the keys on a memcache server
This script lists all the keys on a memcache server. #!/bin/bash nc localhost 11211 > /tmp/$$.1 <<EOF stats items EOF cut -d: -f2 /tmp/$$.1 | grep -v END | uniq
Read MoreRalink RT5572 based WiFi Usb Dongle setup on Ubuntu 12.04
The WiFi USB dongles based on the newest RT5572 chip set do not work out of the box on Ubuntu. Unex DNUR-V72, D-Link DWA-160 Rev B and TP-Link TL-WDN3200 dongles are
Read MoreRecording a terminal session under Linux
It is possible to record a terminal session under Linux with ttyrec. It also records vi, emacs, etc. sessions. Fisrt, install ttyrec sudo apt-get install ttyrec To start recording a
Read MoreHow To Setup A Protected Wireless Connection Via the Command-Line
Setting up a wireless connection via the command line may vary depending on the USB Wireless Interface you are using. These instructions also work for the Raspberry PI running Wheezy.
Read MoreMasquerading or replacing outgoing SMTP email address with Postfix
Postfix can replace an outgoing email address by another one. To do so, you must perform these steps: Add in /etc/postfix/main.cf the following line smtp_generic_maps = hash:/etc/postfix/generic_maps Add in hash:/etc/postfix/generic_maps a
Read MoreCreate an ext3 or an ext4 partition without a journal
Most of the time, having a journal for ext3 and ext4 partitions is pretty useful. Nevertheless, you can prevent creating a journal by adding the option ^has_journal. For example: mkfs
Read MoreInitializing a brand new disk with “parted”
“parted” is a replacement for “fdisk” of Linux. It can handle disks larger than 2 TB. Issue this command to launch “parted” where /dev/sdL is the disk you want to
Read MoreHow to unmount an encrypted partition?
Unmount the partition umount /mnt Unmap the partition cryptsetup luksClose securebackup
Read MoreHow to mount an encrypted partition?
Map the partition cryptsetup luksOpen /dev/sdXN securebackup Mount the partition mount /dev/mapper/securebackup /mnt
Read MoreHow to setup partition encryption?
To setup partition encryption on Ubuntu, perform the following steps: Install the required software apt-get install cryptsetup For more security, erase the partition you want to encrypt with one of
Read More