How to export Google Chrome password on Linux?

Posted on

How to export my Google Chrome password on Linux to a human-readable text file? In newer versions of Chrome, the passwords are stored using the encrypted password storage provided by the system, either Gnome Keyring or KWallet. We need to force Chrome to use a temporary profile folder with unencrypted password storage. Step 1. Connect
Read more

How to find out the MX record for a domain on Linux?

Posted on

How to find out a domain’s MX record for Email on Linux? For example, to find which domain/IP the email to gmail.com is delivered to. You may make use of the host command. The -t option is used to select the query type. type can be any recognized query type: CNAME, NS, SOA, SIG, KEY,
Read more

How to host multiple websites on a Apache Linux web server?

Posted on

I have a Linux web server with Apache (httpd). How to host multiple websites on Apache? To host websites www.example1.com and www.example2.com on a single node with Apache2 on a single IP, you can use VirtualHost as follows. Edit /etc/httpd/conf/httpd.conf and add the following lines: NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot /var/www/example1.com ServerName www.example1.com # Other
Read more

How to allow websites’ .htaccess files in Apache2?

Posted on

How to allow websites to use .htaccess files in Apache2 web servers? The AllowOverride directive controls this: http://httpd.apache.org/docs/current/mod/core.html#allowoverride To allow AllowOverride in a directory, add the following rules to the /etc/httpd/conf/httpd.conf or similar configuration file for your apache installation: <Directory “/var/www/www.example.com”> Options FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files.
Read more

How to force umount a NFS directory on Linux?

Posted on

The NFS server is down. It is reported “Stale NFS file handle”. I tried ‘umount’ and ‘umount -f’. But neither succeeded. # umount /mnt/store umount.nfs: /mnt/store: Stale NFS file handle # umount -f /mnt/store umount.nfs: /mnt/store: Stale NFS file handle How to force umounting the NFS without rebooting the Linux server? I usually have to
Read more

How to redirect anything written on a file to another file in linux?

Posted on

Suppose we have two files, a.txt and b.txt . If we write anything in a.txt & b.txt, it should be redirected to c.txt. tee may help for this purpose. tee: duplicate standard input You may try a command like this: echo “hello” | tee -a a.txt >>b.txt Both a.txt and b.txt will contain the “hello”.
Read more

How to Add “nomodeset” to Grub2 in Fedora and Ubuntu

Posted on

I need to add nomodeset to make my GPU card work on Linux. Latest Fedora and Ubuntu and their derives use grub2. How to add nomodeset permanently to grub2 on Fedora and Ubuntu? The parameters grub2 will use are stored in its grub.cfg file. The grub.cfg file is generated from grub’s default settings file /etc/default/grub.
Read more

How to run firefox under different profiles simultaniusly?

Posted on

Firefox has multiple profiles and I am aware of choosing them by invoking firefox with the -P option. But I find that after one firefox instance under one profile is running, even I choose another profile during starting with -P, the new instance is still running under the existing profile. How to run firefox with
Read more

Skype crashes because it cannot read data from “C:Documents and SettingsAdministratorLocal SettingsTemp”

Posted on

On my laptop, I install windows xp because it is user-friendly for me. However, Skype cannot be open because “The system is not unavailable”. At last, I find the “Skype” directory under “C:Documents and SettingsAdministratorLocal SettingsTemp” cannot be accessed. “C:Documents and SettingsAdministratorLocal SettingsTemp” is like temporary directory for specific user under Linux OS. Actually, for
Read more

How to enable SSH service on Fedora Linux?

Posted on

How to enable SSH service on Fedora Linux? By default, it seems ssh is not enabled. Fedora may not have sshd service installed/enabled by default. You will need to install and configure it by yourself. The following instructions is for Fedora 22 as an example. First, install the sshd server by # dnf install openssh-server
Read more

How to merge 2 .a libraries to one .a library on Linux?

Posted on

We have 2 static .a libraries and we would like to merge them into a single one for easier usage. How to merge 2 .a libraries to one .a library on Linux? With GNU ar, you can specify the single command-line option -M and control it with a script supplied via standard input, like the
Read more

How to Passwordless SSH to an OpenWrt Router?

Posted on

The good ssh-copy-id method which works well on common Linux seems not working for OpenWrt router. How to Passwordless SSH to an OpenWrt Router? OpenWrt’s SSH server is Dropbear. It can accept normal RSA keys. But the authorized_keys location is not the same as the openssh “~/.ssh/authorized_keys”. The location for the authorized_keys is /etc/dropbear/authorized_keys What
Read more

How to change the display manager on Fedora Linux?

Posted on

The default display manager on my Fedora 22 is gdm. If I would like to change it to other display manager like KDM, LightDM or other, which is the portable and reliable method? You can use the “system-switch-displaymanager” tools to manage the display manager. This is possibly the most portable way. To install it: #
Read more

How to make Fedora Linux not clean some files in /tmp/?

Posted on

On my Fedora 20, I find that the system automatically clean up file under /tmp/. This is convenient. However, it cause some problems for some programs. For example, HDFS puts its DataNode pid file under /tmp/ by default like hadoop-hadoop-datanode.pid. After it is cleaned up, the hadoop-daemon.sh script will consider there is no DataNode running.
Read more

How to configure systemd to boot Linux to console mode (runlevel 3)?

Posted on

How to configure Linux (am using Fedora 21) managed by systemd to boot to console (init 3) mode? systemd has the concept of targets as a more flexible replacement for runlevels in sysvinit. Runlevel 3 is emulated by multi-user.target. runlevel3.target is a symbolic link to multi-user.target. You can switch to ‘runlevel 3’ by running #
Read more

How to deactivate a LVM logical volume on Linux?

Posted on

How to deactivate a LVM logical volume activated by #vgchange -aay on Linux You may need to make a LVM volume group inactive and thus unknown to the kernel. To deactivate a volume group, use the -a (–activate) argument of the vgchange command. To deactivates the volume group vg, use this command # vgchange -a
Read more

mkfs refuses to make filesystem with message “is apparently in use by the system; will not make a filesystem here!”

Posted on

I have a disk from another server installed on a new server. However, when I try to make a filesystem on it, mkfs reports # mkfs -t ext4 /dev/sdd1 mke2fs 1.42.8 (20-Jun-2013) /dev/sdd1 is apparently in use by the system; will not make a filesystem here! This is a new disk to the new server.
Read more