How To Use Etc Command In Linux
Remember that tabs and spaces are also treated as characters.
How to use etc command in linux. A few tips about listing users in linux. If you don t know which directory you are working in use the command pwd print working directory. The vipw and vigr commands are used to safely edit the files etc passwd and etc group in linux systems. You can change this default behavior by using the symbol followed by a hostname or ip address of the name server along. Many manuals most linux command line tools include a man page.
By default dig commands will query the name servers listed in etc resolv conf to perform a dns lookup for you. Read wikipedia s summary for a full breakdown of what each directory is and how it is used. There s even a man page for the man program itself which is accessed using man man of course. Alsa base conf which needs root permissions you can use the command sudo nano alsa base. See your current directory.
The following dig command sends the dns query to google s name server 8 8 8 8 by using the 8 8 8 8 option. Use the visudo command to edit the configuration file. For example if you want to edit a file like viz. Sudo a widely used command in the linux command line sudo stands for superuser do. The results will look like this.
To add a user and grant full sudo privileges add the following line. This will open etc sudoers for editing. They will put appropriate locks when editing etc passwd and etc group files to prevent other users from making any changes in them and avoid file corruption. Here are a few tips that would help you while dealing with the users listing. Grep root etc passwd cut d f1 6 7 output delimiter n root root bin bash operator root sbin nologin how to cut by c haracters.
This is where vipw and vigr commands comes in rescue. Now open the etc hosts file using your editor of choice as follows sudo vi etc hosts then add the lines below to the end of the file as shown in the screen shot below. This is done using the visudo command. This is helpful when you are not the admin on a linux system and don t have sudo access. Configure dns locally using etc hosts file in linux.