{"id":372,"date":"2018-07-13T10:51:23","date_gmt":"2018-07-13T10:51:23","guid":{"rendered":"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/?post_type=chapter&#038;p=372"},"modified":"2019-05-16T09:02:37","modified_gmt":"2019-05-16T09:02:37","slug":"module-namebasic-system-administration","status":"publish","type":"chapter","link":"https:\/\/ebooks.inflibnet.ac.in\/itp7\/chapter\/module-namebasic-system-administration\/","title":{"rendered":"Basic system administration"},"content":{"raw":"<div><span style=\"float: right;\"><a href=\"https:\/\/youtu.be\/s-UXRb7ToFo\" target=\"_blank\" rel=\"noopener\"><img src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a>\r\n<\/span><\/div>\r\n&nbsp;\r\n\r\n<strong>Linux Daemons<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify;\">We have already seen in module #12 that daemons are processes that run in background indefinitely. Daemons are generally server processes that are used to provide services to the clients. In most of the cases, the daemon process starts with the booting of Linux system and terminates when the system shuts down. Some examples of daemons are httpd (web server), vsftpd (file server), crond (job scheduler), etc. Few other processes like firewall keep on running from the booting of the system to its shutdown phase. An efficient administrator must know how to start and stop daemons, how to enable and disable daemons and so on.<\/p>\r\n&nbsp;\r\n\r\n<strong>Service Command<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify;\">The service command is used to start, stop or restart a daemon. Since the daemons are server processes, the user with root privileges can modify the status of daemons. Hence, the service command can be executed only by the root user or user with root level privileges. Let us see the syntax of service command with few examples:<\/p>\r\n&nbsp;\r\n\r\nSyntax:\r\n\r\n$service SCRIPT COMMAND [OPTIONS]\r\n\r\nExample:\r\n<p style=\"text-align: center;\"><img class=\"size-full wp-image-373 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X80.png\" alt=\"\" width=\"657\" height=\"117\" \/><\/p>\r\n<p style=\"text-align: justify;\">The service command can be either executed with the \u2018#\u2019 prompt or using the sudo command. In the above example, we are modifying the status of httpd. The daemon httpd is a web server, so the command starts, stops and restarts the web server. The service command is also used to query the status.<\/p>\r\n<img class=\"size-full wp-image-374 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X80-1.png\" alt=\"\" width=\"651\" height=\"67\" \/>\r\n<p style=\"text-align: justify;\">Note: Recently, the linux distributions have switched from using service command to systemctl command. In future, most of the distributions will support systemctl command.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify;\">Systemctl is a systemd utility and is responsible for Controlling the system and service manager. The system V init daemon is being replace by Systemd, it is a collection of system management daemons, utilities and libraries.<\/p>\r\n<strong>Example:<\/strong>\r\n\r\n<img class=\"alignnone size-full wp-image-375 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X81.png\" alt=\"\" width=\"654\" height=\"105\" \/>\r\n\r\n&nbsp;\r\n\r\n<strong>Starting \/ Stopping Firewalls<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify;\">In linux, firewall executes as a service. The firewall can be enabled\/disabled or started and stopped as and when required. The \u2018iptables\u2019 is the firewall in Linux. Some times it is required to troubleshoot networking by modifying the status of iptables.<\/p>\r\n&nbsp;\r\n\r\nExample:\r\n\r\n<img class=\"size-full wp-image-376 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X82.png\" alt=\"\" width=\"654\" height=\"188\" \/>\r\n<p style=\"text-align: justify;\">In Ubuntu, there is another command that deals with the firewall, \u201cufw\u201d is the command which means \u2018uncomplicated firewall\u2019.<\/p>\r\nExample:\r\n<p style=\"text-align: center;\"><img class=\"size-full wp-image-377 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X83.png\" alt=\"\" width=\"671\" height=\"70\" \/><\/p>\r\n&nbsp;\r\n\r\n<strong>Overview of Runlevels<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify;\">Linux operating system boots with a specific runlevel. Each runlevel has its significance, for instance the system booted with runlevel 1 will be in a single user mode, hence no one will be able to logon to that system until it is in runlevel 1.However, when the system is booted in runlevel 2, it supports multiple users. Each runlevel has a certain number of services stopped or started, giving the user control over the behavior of the machine. Conventionally, seven runlevels exist, numbered from zero to six. The list of runlevels and its description is mentioned in the following table:<\/p>\r\n<img class=\"size-full wp-image-378 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X87.png\" alt=\"\" width=\"688\" height=\"242\" \/>\r\n<p style=\"text-align: justify;\">Daemons execute with some runlevel. For example, suppose if we want to modify the services of httpd, we may execute the httpd process with run level 0 (single user mode) so that no other client can access the webserver. So, we can troubleshoot the webserver while it is running though it won\u2019t be accessible to others. If we wish to run webserver in such a way that others can access it, we can start the httpd service in runlevel 3.<\/p>\r\n<p style=\"text-align: justify;\">The chkconfig command is used to check the status of runlevels, modify runlevels and enable\/disable the runlevels. Chkconfig command is used to setup, view, or change services that are configured to start automatically during the system startup<\/p>\r\n&nbsp;\r\n<p style=\"text-align: center;\"><img class=\"size-full wp-image-379 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X87-1.png\" alt=\"\" width=\"674\" height=\"376\" \/><\/p>\r\n<p style=\"text-align: center;\"><strong>Figure 1: Output of chkcofig command<\/strong><\/p>\r\n&nbsp;\r\n\r\nWe can scan the runlevel of selected services using the following technique:\r\n\r\n<img class=\"alignnone size-full wp-image-380 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X88.png\" alt=\"\" width=\"653\" height=\"110\" \/>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify;\">The chkconfig command can also be used to enable a particular runlevel for the daemons. By specifying the option on\/off, we can either enable or disable services for particular runlevels.<\/p>\r\n<p style=\"text-align: center;\"><img class=\"size-full wp-image-381 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X89.png\" alt=\"\" width=\"672\" height=\"165\" \/><\/p>\r\n\r\n<div>\r\n\r\n<strong>Network Configuration<\/strong>\r\n\r\n<\/div>\r\n<p style=\"text-align: justify;\">Now let us see how to display the IP address of any system, later we will see how we can modify the IP addresses. The following command can be used to retrieve network related information:<\/p>\r\n<p style=\"text-align: center;\"><img class=\"size-full wp-image-382 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X90.png\" alt=\"\" width=\"655\" height=\"390\" \/><\/p>\r\n<p style=\"text-align: justify;\">The ifconfig command displays network configurations of all interfaces. In the figure 2, we can see that IP address is assigned to wlan0 (wirelesss card) but it is not assigned to eth0 (Ethernet card). The name of adapter like eth0 or wlan0 may vary depending on the linux distribution. The configurations listed in figure 2 are stored in a file <strong>\/etc\/network-scripts\/ifcfg-eth0.<\/strong><\/p>\r\n<p style=\"text-align: center;\"><img class=\"size-full wp-image-383 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X91.png\" alt=\"\" width=\"656\" height=\"272\" \/><\/p>\r\n<p style=\"text-align: center;\">Few other Network related Commands<\/p>\r\n<img class=\"alignnone size-full wp-image-384 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X93.png\" alt=\"\" width=\"670\" height=\"200\" \/>\r\n\r\nLet us summarize the key concepts covered in this module\r\n<ul>\r\n \t<li>What is a runlevel and how to modify it<\/li>\r\n \t<li>How to start\/stop services.<\/li>\r\n \t<li>How to enable\/disable services.<\/li>\r\n \t<li>How to configure networking in Linux.<\/li>\r\n \t<li>Few network related commands<\/li>\r\n<\/ul>\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>you can view video on Basic system administration<\/strong><\/td>\r\n<td><a href=\"https:\/\/youtu.be\/s-UXRb7ToFo\" target=\"_blank\" rel=\"noopener\"><img class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n<strong>References<\/strong>\r\n<ol>\r\n \t<li style=\"text-align: justify;\">Tom. Adelstein and Bill. Lubanovic. 2007. <em>Linux system administration<\/em>, O\u2019Reilly.<\/li>\r\n \t<li style=\"text-align: justify;\">Sam R. Alapati. 2016. <em>Modern Linux Administration How to Become a Cutting-edge<\/em> <em>Linux Administrator.<\/em>, Oreilly &amp; Associates Inc.<\/li>\r\n \t<li style=\"text-align: justify;\">Kirk. Bauer. 2003. <em>Automating UNIX and Linux administration<\/em>, Apress.<\/li>\r\n \t<li style=\"text-align: justify;\">Richard Blum. 2008. <em>Linux command line and shell scripting bible<\/em>, Wiley Pub.<\/li>\r\n \t<li style=\"text-align: justify;\">M. Carling, Stephen. Degler, and James. Dennis. 2000. <em>Linux system administration<\/em>, New Riders.<\/li>\r\n \t<li style=\"text-align: justify;\">Chuck. Easttom and Serge N. Palladino. 2012. <em>Essential Linux administration\u202f: a<\/em> <em>comprehensive guide for beginners<\/em>, Course Technology\/Cengage Learning.<\/li>\r\n \t<li style=\"text-align: justify;\">Richard Fox. <em>Linux with operating system concepts<\/em>,<\/li>\r\n \t<li style=\"text-align: justify;\">Aeleen. Frisch. 2002. <em>Essential system administration<\/em>, O\u2019Reilly.<\/li>\r\n \t<li style=\"text-align: justify;\">el. .\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 . <em>Linux system administration\u202f: a user\u2019s guide<\/em>, Addison-Wesley.<\/li>\r\n \t<li style=\"text-align: justify;\">Juliet. Kemp. 2009. <em>Linux system administration recipes\u202f: a problem-solution approach<\/em>, Apress.<\/li>\r\n \t<li style=\"text-align: justify;\">Olaf. Kirch and Terry. Dawson. 2000. <em>Linux network administrator\u2019s guide<\/em>, O\u2019Reilly.<\/li>\r\n \t<li style=\"text-align: justify;\">Olaf. Kirch and Terry. Dawson. 2000. <em>Linux network administrator\u2019s guide<\/em>, O\u2019Reilly.<\/li>\r\n \t<li style=\"text-align: justify;\">Mark (Mark F... Komarinski, Cary. Collett, and Inc. Red Hat. 2000. <em>Red Hat Linux<\/em> <em>administration handbook<\/em>, Prentice Hall PTR.<\/li>\r\n \t<li style=\"text-align: justify;\">Chris Negus. <em>Linux bible<\/em>,<\/li>\r\n \t<li style=\"text-align: justify;\">Roderick W. Smith. 2007. <em>Linux administrator street smarts\u202f: a real world guide to Linux<\/em> <em>certification skills<\/em>, John Wiley.<\/li>\r\n \t<li style=\"text-align: justify;\">Wale Soyinka. <em>Linux administration\u202f: a beginner\u2019s guide<\/em>,<\/li>\r\n \t<li style=\"text-align: justify;\">Vicki. Stanfield and Roderick W. Smith. 2002. <em>Linux system administration<\/em>, Sybex.<\/li>\r\n \t<li style=\"text-align: justify;\">Nicholas. Wells. 2000. <em>Guide to Linux installation and administration<\/em>, Course Technology, Thomson Learning.<\/li>\r\n \t<li style=\"text-align: justify;\">Matt. Welsh, Matthias Kalle. Dalheimer, Terry. Dawson, and Lar. Kaufman. 2003. <em>Running Linux<\/em>, O\u2019Reilly.<\/li>\r\n<\/ol>","rendered":"<div><span style=\"float: right;\"><a href=\"https:\/\/youtu.be\/s-UXRb7ToFo\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a><br \/>\n<\/span><\/div>\n<p>&nbsp;<\/p>\n<p><strong>Linux Daemons<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">We have already seen in module #12 that daemons are processes that run in background indefinitely. Daemons are generally server processes that are used to provide services to the clients. In most of the cases, the daemon process starts with the booting of Linux system and terminates when the system shuts down. Some examples of daemons are httpd (web server), vsftpd (file server), crond (job scheduler), etc. Few other processes like firewall keep on running from the booting of the system to its shutdown phase. An efficient administrator must know how to start and stop daemons, how to enable and disable daemons and so on.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Service Command<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">The service command is used to start, stop or restart a daemon. Since the daemons are server processes, the user with root privileges can modify the status of daemons. Hence, the service command can be executed only by the root user or user with root level privileges. Let us see the syntax of service command with few examples:<\/p>\n<p>&nbsp;<\/p>\n<p>Syntax:<\/p>\n<p>$service SCRIPT COMMAND [OPTIONS]<\/p>\n<p>Example:<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-373 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X80.png\" alt=\"\" width=\"657\" height=\"117\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X80.png 657w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X80-300x53.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X80-65x12.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X80-225x40.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X80-350x62.png 350w\" sizes=\"auto, (max-width: 657px) 100vw, 657px\" \/><\/p>\n<p style=\"text-align: justify;\">The service command can be either executed with the \u2018#\u2019 prompt or using the sudo command. In the above example, we are modifying the status of httpd. The daemon httpd is a web server, so the command starts, stops and restarts the web server. The service command is also used to query the status.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-374 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X80-1.png\" alt=\"\" width=\"651\" height=\"67\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X80-1.png 651w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X80-1-300x31.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X80-1-65x7.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X80-1-225x23.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X80-1-350x36.png 350w\" sizes=\"auto, (max-width: 651px) 100vw, 651px\" \/><\/p>\n<p style=\"text-align: justify;\">Note: Recently, the linux distributions have switched from using service command to systemctl command. In future, most of the distributions will support systemctl command.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">Systemctl is a systemd utility and is responsible for Controlling the system and service manager. The system V init daemon is being replace by Systemd, it is a collection of system management daemons, utilities and libraries.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-375 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X81.png\" alt=\"\" width=\"654\" height=\"105\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X81.png 654w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X81-300x48.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X81-65x10.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X81-225x36.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X81-350x56.png 350w\" sizes=\"auto, (max-width: 654px) 100vw, 654px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Starting \/ Stopping Firewalls<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">In linux, firewall executes as a service. The firewall can be enabled\/disabled or started and stopped as and when required. The \u2018iptables\u2019 is the firewall in Linux. Some times it is required to troubleshoot networking by modifying the status of iptables.<\/p>\n<p>&nbsp;<\/p>\n<p>Example:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-376 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X82.png\" alt=\"\" width=\"654\" height=\"188\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X82.png 654w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X82-300x86.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X82-65x19.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X82-225x65.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X82-350x101.png 350w\" sizes=\"auto, (max-width: 654px) 100vw, 654px\" \/><\/p>\n<p style=\"text-align: justify;\">In Ubuntu, there is another command that deals with the firewall, \u201cufw\u201d is the command which means \u2018uncomplicated firewall\u2019.<\/p>\n<p>Example:<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-377 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X83.png\" alt=\"\" width=\"671\" height=\"70\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X83.png 671w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X83-300x31.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X83-65x7.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X83-225x23.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X83-350x37.png 350w\" sizes=\"auto, (max-width: 671px) 100vw, 671px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Overview of Runlevels<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">Linux operating system boots with a specific runlevel. Each runlevel has its significance, for instance the system booted with runlevel 1 will be in a single user mode, hence no one will be able to logon to that system until it is in runlevel 1.However, when the system is booted in runlevel 2, it supports multiple users. Each runlevel has a certain number of services stopped or started, giving the user control over the behavior of the machine. Conventionally, seven runlevels exist, numbered from zero to six. The list of runlevels and its description is mentioned in the following table:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-378 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X87.png\" alt=\"\" width=\"688\" height=\"242\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X87.png 688w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X87-300x106.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X87-65x23.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X87-225x79.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X87-350x123.png 350w\" sizes=\"auto, (max-width: 688px) 100vw, 688px\" \/><\/p>\n<p style=\"text-align: justify;\">Daemons execute with some runlevel. For example, suppose if we want to modify the services of httpd, we may execute the httpd process with run level 0 (single user mode) so that no other client can access the webserver. So, we can troubleshoot the webserver while it is running though it won\u2019t be accessible to others. If we wish to run webserver in such a way that others can access it, we can start the httpd service in runlevel 3.<\/p>\n<p style=\"text-align: justify;\">The chkconfig command is used to check the status of runlevels, modify runlevels and enable\/disable the runlevels. Chkconfig command is used to setup, view, or change services that are configured to start automatically during the system startup<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-379 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X87-1.png\" alt=\"\" width=\"674\" height=\"376\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X87-1.png 674w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X87-1-300x167.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X87-1-65x36.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X87-1-225x126.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X87-1-350x195.png 350w\" sizes=\"auto, (max-width: 674px) 100vw, 674px\" \/><\/p>\n<p style=\"text-align: center;\"><strong>Figure 1: Output of chkcofig command<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>We can scan the runlevel of selected services using the following technique:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-380 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X88.png\" alt=\"\" width=\"653\" height=\"110\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X88.png 653w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X88-300x51.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X88-65x11.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X88-225x38.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X88-350x59.png 350w\" sizes=\"auto, (max-width: 653px) 100vw, 653px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">The chkconfig command can also be used to enable a particular runlevel for the daemons. By specifying the option on\/off, we can either enable or disable services for particular runlevels.<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-381 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X89.png\" alt=\"\" width=\"672\" height=\"165\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X89.png 672w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X89-300x74.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X89-65x16.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X89-225x55.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X89-350x86.png 350w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/p>\n<div>\n<p><strong>Network Configuration<\/strong><\/p>\n<\/div>\n<p style=\"text-align: justify;\">Now let us see how to display the IP address of any system, later we will see how we can modify the IP addresses. The following command can be used to retrieve network related information:<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-382 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X90.png\" alt=\"\" width=\"655\" height=\"390\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X90.png 655w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X90-300x179.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X90-65x39.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X90-225x134.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X90-350x208.png 350w\" sizes=\"auto, (max-width: 655px) 100vw, 655px\" \/><\/p>\n<p style=\"text-align: justify;\">The ifconfig command displays network configurations of all interfaces. In the figure 2, we can see that IP address is assigned to wlan0 (wirelesss card) but it is not assigned to eth0 (Ethernet card). The name of adapter like eth0 or wlan0 may vary depending on the linux distribution. The configurations listed in figure 2 are stored in a file <strong>\/etc\/network-scripts\/ifcfg-eth0.<\/strong><\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-383 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X91.png\" alt=\"\" width=\"656\" height=\"272\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X91.png 656w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X91-300x124.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X91-65x27.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X91-225x93.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X91-350x145.png 350w\" sizes=\"auto, (max-width: 656px) 100vw, 656px\" \/><\/p>\n<p style=\"text-align: center;\">Few other Network related Commands<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-384 aligncenter\" src=\"http:\/\/itp7.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/30\/2018\/07\/X93.png\" alt=\"\" width=\"670\" height=\"200\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X93.png 670w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X93-300x90.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X93-65x19.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X93-225x67.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-content\/uploads\/sites\/30\/2018\/07\/X93-350x104.png 350w\" sizes=\"auto, (max-width: 670px) 100vw, 670px\" \/><\/p>\n<p>Let us summarize the key concepts covered in this module<\/p>\n<ul>\n<li>What is a runlevel and how to modify it<\/li>\n<li>How to start\/stop services.<\/li>\n<li>How to enable\/disable services.<\/li>\n<li>How to configure networking in Linux.<\/li>\n<li>Few network related commands<\/li>\n<\/ul>\n<table>\n<tbody>\n<tr>\n<td><strong>you can view video on Basic system administration<\/strong><\/td>\n<td><a href=\"https:\/\/youtu.be\/s-UXRb7ToFo\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>References<\/strong><\/p>\n<ol>\n<li style=\"text-align: justify;\">Tom. Adelstein and Bill. Lubanovic. 2007. <em>Linux system administration<\/em>, O\u2019Reilly.<\/li>\n<li style=\"text-align: justify;\">Sam R. Alapati. 2016. <em>Modern Linux Administration How to Become a Cutting-edge<\/em> <em>Linux Administrator.<\/em>, Oreilly &amp; Associates Inc.<\/li>\n<li style=\"text-align: justify;\">Kirk. Bauer. 2003. <em>Automating UNIX and Linux administration<\/em>, Apress.<\/li>\n<li style=\"text-align: justify;\">Richard Blum. 2008. <em>Linux command line and shell scripting bible<\/em>, Wiley Pub.<\/li>\n<li style=\"text-align: justify;\">M. Carling, Stephen. Degler, and James. Dennis. 2000. <em>Linux system administration<\/em>, New Riders.<\/li>\n<li style=\"text-align: justify;\">Chuck. Easttom and Serge N. Palladino. 2012. <em>Essential Linux administration\u202f: a<\/em> <em>comprehensive guide for beginners<\/em>, Course Technology\/Cengage Learning.<\/li>\n<li style=\"text-align: justify;\">Richard Fox. <em>Linux with operating system concepts<\/em>,<\/li>\n<li style=\"text-align: justify;\">Aeleen. Frisch. 2002. <em>Essential system administration<\/em>, O\u2019Reilly.<\/li>\n<li style=\"text-align: justify;\">el. .\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 . <em>Linux system administration\u202f: a user\u2019s guide<\/em>, Addison-Wesley.<\/li>\n<li style=\"text-align: justify;\">Juliet. Kemp. 2009. <em>Linux system administration recipes\u202f: a problem-solution approach<\/em>, Apress.<\/li>\n<li style=\"text-align: justify;\">Olaf. Kirch and Terry. Dawson. 2000. <em>Linux network administrator\u2019s guide<\/em>, O\u2019Reilly.<\/li>\n<li style=\"text-align: justify;\">Olaf. Kirch and Terry. Dawson. 2000. <em>Linux network administrator\u2019s guide<\/em>, O\u2019Reilly.<\/li>\n<li style=\"text-align: justify;\">Mark (Mark F&#8230; Komarinski, Cary. Collett, and Inc. Red Hat. 2000. <em>Red Hat Linux<\/em> <em>administration handbook<\/em>, Prentice Hall PTR.<\/li>\n<li style=\"text-align: justify;\">Chris Negus. <em>Linux bible<\/em>,<\/li>\n<li style=\"text-align: justify;\">Roderick W. Smith. 2007. <em>Linux administrator street smarts\u202f: a real world guide to Linux<\/em> <em>certification skills<\/em>, John Wiley.<\/li>\n<li style=\"text-align: justify;\">Wale Soyinka. <em>Linux administration\u202f: a beginner\u2019s guide<\/em>,<\/li>\n<li style=\"text-align: justify;\">Vicki. Stanfield and Roderick W. Smith. 2002. <em>Linux system administration<\/em>, Sybex.<\/li>\n<li style=\"text-align: justify;\">Nicholas. Wells. 2000. <em>Guide to Linux installation and administration<\/em>, Course Technology, Thomson Learning.<\/li>\n<li style=\"text-align: justify;\">Matt. Welsh, Matthias Kalle. Dalheimer, Terry. Dawson, and Lar. Kaufman. 2003. <em>Running Linux<\/em>, O\u2019Reilly.<\/li>\n<\/ol>\n","protected":false},"author":4,"menu_order":26,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":["mr-hardik-joshi"],"pb_section_license":""},"chapter-type":[],"contributor":[58],"license":[],"class_list":["post-372","chapter","type-chapter","status-publish","hentry","contributor-mr-hardik-joshi"],"part":3,"_links":{"self":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-json\/pressbooks\/v2\/chapters\/372","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-json\/wp\/v2\/users\/4"}],"version-history":[{"count":8,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-json\/pressbooks\/v2\/chapters\/372\/revisions"}],"predecessor-version":[{"id":712,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-json\/pressbooks\/v2\/chapters\/372\/revisions\/712"}],"part":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-json\/pressbooks\/v2\/chapters\/372\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-json\/wp\/v2\/media?parent=372"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-json\/pressbooks\/v2\/chapter-type?post=372"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-json\/wp\/v2\/contributor?post=372"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp7\/wp-json\/wp\/v2\/license?post=372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}