sangkrit

The –help Option in Linux

–help option gives a short description about using any command when typed in the terminal followed by the particular command in which you need help. Following example shows the use of rmdir command.

rmdir –help (press enter)

Usage: rmdir [OPTION]… DIRECTORY…

Remove the DIRECTORY(ies), if they are empty. [...]

Info Command & Pages

Addition to man pages, Info pages are also helpful for any command. You can read any info page by using info command. They contain recent information for and are easier to use. Some of the man pages refer to info pages. For example if you need info of ‘info’ command then just type: info info [...]

Man (Manual) Command and Documentation

Man (Manual) pages are overwhelming source of documentation. You can read the manual of any command by typing man followed by the command name in the terminal followed by ‘Enter’ key on your keyboard, a very structured manual will be visible in your terminal. As shown below which is the manual of ls command. Input: [...]

Default File Permission

System gives default permissions when we create any file. Most of the systems have 755 permission (read, write and execute for the owner, and read and execute for others) as default. This default is setup with umask command. One can use this command by finding the right octal number. You may also turn [...]

Changing File Permissions

You can change any file permission by using the command chmod $ chmod 755 file $ ls -l file -rwxr-xr-x 1 root users 1656 Feb 17 01:11 filename Numbers are based on three kinds of file permission.

Read=4 Write=2 Execute=1

In the given list 755 means the user will be having [...]

File Permissions

Sometimes opening a file get refused by the system with the error message “Permission Denied”. This happens because of file permissions, usually there are three types of file permissions. They are: read, write and execute. Listing files shows the permissions that files have.

ls -l filename.dat -rw-r—r– 1 root users 1656 Feb 17 01:11 filename.dat

[...]

How To Allow Users To Run Root Programs

A command runs with the permission of certain user. If you want to allow any user to run some commands with root permission then there is a command known as suid. You may set any command to be suid root by chmod command: chmod +s mybin

Creating New User In Linux

Following command creates a new user in Ubuntu by setting up his password, ownership and creating a home directory. sudo useradd user sudo passwd user sudo mkdir /home/user sudo chown newuser /home/user sudo chgrp newuser /home/user

How to change the owner of files and directories

Simplest kind is the best kind in technology and it is an art.

chown -R www-data:www-data directory Changes the owner & group of both directories and sub directories

Page 1 of 212