How to Prevent a Linux Laptop from Entering Sleep Mode When the Lid is Closed

Initially, I thought it would be a simple setting adjustment, so I casually Googled it. Sure enough, there was a unanimous solution: modify /etc/systemd/logind.conf, change HandleLidSwitch to ignore or lock, and then restart logind or reboot. I tried this, but it didn’t work at all on my Thinkpad X230. I then tried changing some other options in the aforementioned file, but none worked, and surprisingly, Ubuntu even reported errors. So, I reinstalled the more preferred Debian. Tried again, and it still didn’t work. Finally, I found a more brutal method. ...

March 31, 2020 · 1 min · 171 words · Jack Yu

How to Configure CentOS 6 NFS Service

Server Side Disable SeLinux Edit the configuration file: vi /etc/selinux/config Modify as follows: #SELINUX=enforcing # Comment out #SELINUXTYPE=targeted # Comment out SELINUX=disabled # Add this line Then reboot the system: reboot # Restart the system Create a Directory Using the root user, create a directory named /nfs. Note: It’s best to check which partition has the most space by running df, as the root (/) partition may not have the most space. In some automatic partitioning setups, the /home partition may have the most space. ...

June 5, 2014 · 2 min · 297 words · Jack Yu

How to Install CentOS as a Virtualization Host

Installation Process Installed Version: CentOS 6.3 Using Win32DiskImager to create a USB flash drive image was unsuccessful; installing from an external USB optical drive was successful. During the installation process, make sure to select the “Virtual Host” installation mode. The rest can be set to default or slightly modified, such as choosing the time zone. After installation, it will include the KVM suite and SSH. Installation Notes No internet connection is needed throughout the process, which is much better than Debian and Ubuntu. You’re not forced to set up a non-root user. Before installation, be sure to check whether your CPU supports virtualization and enable the motherboard’s virtualization setting. If the motherboard supports virtualization but doesn’t have a virtualization option, you can still use virtualization as it’s definitely enabled by default. There’s a saying that Intel CPUs with a ‘K’ cannot perform virtualization. ‘K’ means Intel CPUs that can be overclocked. It seems that faster and newer CPUs are not necessarily better.

June 5, 2014 · 1 min · 162 words · Jack Yu