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
Tag: Linux
How to find out the MX record for a domain on Linux?
Posted onHow 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 onI 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 onHow 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 onThe 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 onSuppose 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 onI 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 onFirefox 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
How to wrap long lines in a text file on Linux?
Posted onI have some text files which contain some long lines. Now I would like to break lines to at most 80 characters. How to wrap long lines in a text file on Linux? The fold command can wrap lines. fold – wrap each input line to fit in specified width For your purpose, fold -w
Read more
Skype crashes because it cannot read data from “C:Documents and SettingsAdministratorLocal SettingsTemp”
Posted onOn 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
git: how to merge upstream with fork repo
Posted onHow to merge upstream into local fork repo with git? Merging an upstream repository into your fork: https://help.github.com/articles/merging-an-upstream-repository-into-your-fork/ Merging an upstream repository into your fork: https://help.github.com/articles/merging-an-upstream-repository-into-your-fork/
How to enable SSH service on Fedora Linux?
Posted onHow 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 onWe 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 onThe 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 onThe 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 onOn 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 onHow 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
Xterm color codes for Vim on Linux
Posted onVim uses Xterm color codes like 9, 1 and 114 on Linux. What’s the overall mapping from color to codes or codes to color? Xterm color table: You can also find the Xterm color codes here.
How to deactivate a LVM logical volume on Linux?
Posted onHow 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 onI 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