/etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf
Use following command and answer YES to enable dynamic updates:
sudo dpkg-reconfigure resolvconf
Do a system restart after that.
Related cards:
Check if package is installed in linux
To check if a given package is installed in Debian / Ubuntu, type
dpkg -s <package-name>
To get a neater output use dpkg-query which accepts wildcards as well.
dpkg-query -l <package-name>
In Redhat / Fedora / CentOS use the foll...
SUDO not working
sudo: /etc/sudoers is mode 0640, should be 0440?
When a similar message appears when you try to run sudo on your machine, the problem is likely with the permissions of /etc/sudoers file.
Try running
pkexec chmod 0440 /etc/sudoers
```...
unable to run package setup for sublime text
I've encountered the following error after installing Sublimetext2 from source on my ubuntu machine. The error says
unable to run package setup with list of packages
in a dialog box when sublime text is opened.
The issue is because of missing...
what is ./ and ../ in linux
In linux, we often see the use of ./ or ../ before a file name. Here is the explanation for the same
. Current Directory
.. Parent Directory
./filename # referring to file name in current directory
../filename # referring to file name in p...
Network manager says wired network device not managed
If you have any trouble in accessing internet using your wired connection and while troubleshooting, if your network manager says that "device is not managed", open the terminal and follow the below steps to fix the issue.
sudo vim /etc/Netwo...
know which window manager is running
In ubuntu, you have a variety of window managers to choose from. Though Ubuntu 12.04 comes with Unity as the default you can switch back to Gnome, or choose other managers like Cinnamon.
If you want to know, which window manager you are running c...
Find Class of a variable in Javascript
As we have object.class method in Ruby, to check the class of a variable in Javascript, here is the snippet
var ss = "some string";
alert (typeof ss); #=> string
alert (typeof pp); #=> undefined
add sublime text option to the contextual menu
After installing sublime text, we must be able to open text files with it. Right click on a text file and you must see the option "open with sublime text". In case you don't , click Open with other applications and you should see Sublime text opti...
Clearing out old Rails session records from a MySQL database
To delete sessions based on a hard coded cut-off date:
DELETE FROM sessions WHERE updated_at < STR_TO_DATE('23.05.2013',GET_FORMAT(DATE,'EUR'));
Replacing cut-off date with period of inactivity
DELETE FROM sessions WHERE updated_at ...
Copy remote folder to local
To copy a folder in the remote server to your local machine,
scp -r username@IPaddres:/remote/directory/path /local/folder/
In case you wish to copy in your current local directory
scp -r username@IPaddres:/remote/directory/path/ .