In Linux, a link is a way to assign multiple identities to a file, similar to Windows shortcuts. There are some reasons why Linux uses the links: • it helps files to become more accessible; • to give commands/files more names; • to allow programs using the same files to access them from different places. There are two types of links: hard links and symbolic links. Hard links are obtained by...
Manipulate files in Linux: rm command
The rm command (abridged from remove) deletes a file or a directory. The syntax of this command is simple: rm [options] file Brief description of the most used options: –f – will automatically respond with y to all confirmations. It deletes files immediately without confirmation; if both -f and -i occur, the last one that is used in the terminal is taken into account by rm. Deleting a...
Useradd command – adding users to Linux
How often we add new users to a Linux system depends on the nature of the system we use: it can be a personal computer, where we rarely make changes, or a Linux server with many users. This article describes how to add a new user to a Linux system using the useradd command. The basic syntax of the useradd command is: useradd [-c comment] [-d home-dir] [-e expires-date] [-f inactive-days] [-g...
Userdel command – deleting accounts in Linux
Deleting Linux user accounts is easy. Use the userdel command to delete that user’s entry from the /etc/passwd and /etc/shadow files. The basic syntax of this command: userdel [options] username The userdel command only has 3 parameters: Delete user files The -r or –remove parameter tells the system to delete all the user’s emails, the files in the user’s home directory...