Change the home directory of a Linux user with a simple usermod command. While creating a user if you didn’t specify any –home parameter Linux assumes the home directory of the user to be /home/username even if you did specify you can later change it to something else according to your needs. Apart from changing the home directory using the usermod command you’ll have to assign proper ownership and permissions to the new folder. You can also change the home directory by editing the /etc/passwd file. I’ll outline both the steps here.Continue Reading…
Command to Display Directory Sizes in Linux
Even though Linux has developed so much in terms of GUI which has become comparable to the latest Aero theme from Microsoft’s stables (especially in KDE environment) the command line becomes an inevitable tool for performing advanced administrative tasks like setting user quotas, compiling from the source to name it a few. But unlike the command line in windows, Linux command line works differently. A good example is showing the sizes of directories while listing the contents. The “ls” command in Linux shows a list of files and directories in the present directory but doesn’t show the sizes of directories and the file sizes are shown in bytes which makes it difficult to read and understand. So the correct command for this purpose is “du“Continue Reading…