How to change home directory of a linux user

You can modify a user’s home directory using usermod command in Linux. The syntax for the usermod command is sudo usermod -d PATH_TO_HOME_DIR USER_NAME Example I have a user “sok_user1” with home directory /home/sok_user1 root@ok:~# cat /etc/passwd | grep sok_user1 sok_user1:x:1004:1005::/home/sok_user1:/bin/bash root@ok:~# To change the users home directory to /var/www/, we can use the command … Read more

sleep-monitor system is about to suspend

On a remote Linux server running XFCE desktop, the server goes down randomly, on monitoring /var/log/syslog, i found the following message Jan 18 05:43:24 sokdesk ModemManager[1300]: [sleep-monitor] system is about to suspend Jan 18 05:43:24 sokdesk systemd[1]: Reached target Sleep. Jan 18 05:43:24 sokdesk systemd[1]: Starting Record successful boot for GRUB… Jan 18 05:43:24 sokdesk … Read more

RAID getting created as /dev/md127

When I create software RAID with mdadm, it gets created as /dev/md127, instead of /dev/md0 I specified while creating RAID. To fix this, you need to add RAID definition in /etc/mdadm/mdadm.conf, this can be done with mdadm –detail –scan >> /etc/mdadm/mdadm.conf Now run command update-initramfs -u Reboot the server, after reboot, RAID device will be … Read more

linux software installation

Install Thin web server Install Xfce VNC remote desktop on CentOS 7 How to install LetsEncrypt SSL on Bitnami WordPress Server Install Elasticsearch with Docker Install MySQL 8 on FreeBSD How to Install Xfce and VNC on Ubuntu 20.04 How to install ImunifyAV+ How to install development tools on Debian/Ubuntu Install Nginx ModSecurity on CentOS … Read more

How to find CPU of a Linux Server

To find CPU used on a Linux system, run command cat /proc/cpuinfo Example boby@sok-01:~$ cat /proc/cpuinfo | grep -i “model name” model name : AMD Ryzen 3 2200G with Radeon Vega Graphics model name : AMD Ryzen 3 2200G with Radeon Vega Graphics model name : AMD Ryzen 3 2200G with Radeon Vega Graphics model … Read more

ls

ls command is used to list files in linux. It is same as dir on windows. List all files in long format (l), a is to show hidden files ls -la Show only file names ls -b Show only file names. One file per line ls -1

Server Load

Here are some useful commands to check server load. iostat shows disk IO usage. %iowait shows how much time the process waits for disk operation. This should be 0. If you are on VPS, check for %steal to see if the host server is overloaded. iostat 1 10 Checks for processes in ā€˜D’ state for … Read more

mycomputer

These are some software/settings i have on my computer running Ubuntu 20.04 Steam store games on different Disk GNOME Shell Extension Install TeamSpeak Client on Ubuntu Separate Google Hangout icon in Ubuntu 18.04/20.04