{"id":4472,"date":"2013-03-12T00:05:50","date_gmt":"2013-03-11T16:05:50","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=4472"},"modified":"2023-06-25T09:00:45","modified_gmt":"2023-06-25T09:00:45","slug":"7-useful-linux-utilities","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/7-useful-linux-utilities\/","title":{"rendered":"7 Useful Linux Utilities"},"content":{"rendered":"<p>When setting up a new Linux server, there are several utilities that can significantly enhance your system&#8217;s functionality and ease your troubleshooting process. While most Linux distributions come pre-loaded with a plethora of command utilities, a minimal operating system installation might not include all these tools.<\/p>\n<p>This guide will walk you through seven essential Linux utilities that you should consider installing on your server. These utilities are equally functional in CentOS or Red Hat Enterprise Linux (RHEL).<\/p>\n<h2>Identifying Missing Utilities<\/h2>\n<p>Before we delve into the specifics of each utility, it&#8217;s important to know how to identify whether a utility is installed on your Linux operating system. If a utility is missing, you&#8217;ll see one or more of the following warnings:<\/p>\n<pre>\r\n[root@rhel62 ~]# wget\r\n-bash: wget: command not found\r\n[root@rhel62 ~]# telnet\r\n-bash: telnet: command not found\r\n[root@rhel62 ~]# scp\r\n-bash: scp: command not found\r\n[root@rhel62 ~]# man scp\r\n-bash: man: command not found\r\n[root@rhel62 ~]# nslookup\r\n-bash: nslookup: command not found\r\n[root@rhel62 ~]# dig\r\n-bash: dig: command not found\r\n[root@rhel62 ~]# host\r\n-bash: host: command not found\r\n<\/pre>\n<h2>Seven Essential Linux Utilities<\/h2>\n<p>Let&#8217;s now explore each of these seven utilities in detail.<\/p>\n<h3>1. wget<\/h3>\n<p>Wget is a network utility that retrieves files from the Web using HTTP and FTP, the two most widely used Internet protocols. It&#8217;s a handy tool for downloading files from the internet directly to your server.<\/p>\n<pre>[root@rhel62 ~]# wget http:\/\/files2.zimbra.com\/downloads\/8.0.2_GA\/zcs-8.0.2_GA_5569.RHEL6_64.20121210115059.tgz\r\n<\/pre>\n<h3>2. telnet<\/h3>\n<p>Telnet is a network protocol used on the Internet or local area networks. It&#8217;s a user command and an underlying TCP\/IP protocol for accessing remote computers. Telnet is very useful for troubleshooting and verifying the opened ports.<\/p>\n<pre>[root@rhel62 ~]# telnet localhost 25\r\nTrying ::1...\r\nConnected to localhost.\r\nEscape character is '^]'.\r\n220 rhel62.webhostinggeeks-dev2.local ESMTP Postfix\r\n<\/pre>\n<h3>3. scp<\/h3>\n<p>Secure Copy Protocol (scp) is a remote file copy utility between hosts on a network. It uses ssh for data transfer and provides the same authentication and same level of security as ssh.<\/p>\n<pre>[root@rhel62 ~]# scp root@192.168.2.60:\/tmp\/VMwareTools-9.2.2-893683.tar.gz .\r\nThe authenticity of host '192.168.2.60 (192.168.2.60)' can't be established.\r\nRSA key fingerprint is 76:78:87:36:44:c1:46:fa:c4:b4:61:4a:e5:b3:be:e3.\r\nAre you sure you want to continue connecting (yes\/no)? yes\r\nWarning: Permanently added '192.168.2.60' (RSA) to the list of known hosts.\r\nroot@192.168.2.60's password:\r\nVMwareTools-9.2.2-893683.tar.gz                                                       100%   63MB  63.3MB\/s   00:01\r\n<\/pre>\n<h3>4. man<\/h3>\n<p>The &#8216;man&#8217; command is used to display the manual page for other commands. It helps to explain the functions for the commands that are commonly used.<\/p>\n<p>Example :<\/p>\n<pre>[root@rhel62 ~]# man wget\r\n<\/pre>\n<pre>WGET(1)                            GNU Wget                            WGET(1)\r\n\r\nNAME\r\n       Wget - The non-interactive network downloader.\r\n\r\nSYNOPSIS\r\n       wget [option]... [URL]...\r\n\r\nDESCRIPTION\r\n       GNU Wget is a free utility for non-interactive download of files from the Web.  It supports HTTP,\r\n       HTTPS, and FTP protocols, as well as retrieval through HTTP proxies.\r\n\r\n       Wget is non-interactive, meaning that it can work in the background, while the user is not logged on.\r\n       This allows you to start a retrieval and disconnect from the system, letting Wget finish the work.\r\n       By contrast, most of the Web browsers require constant user\u00e2s presence, which can be a great\r\n       hindrance when transferring a lot of data.\r\n\r\n       Wget can follow links in HTML, XHTML, and CSS pages, to create local versions of remote web sites,\r\n       fully recreating the directory structure of the original site.  This is sometimes referred to as\r\n       \"recursive downloading.\"  While doing that, Wget respects the Robot Exclusion Standard (\/robots.txt).\r\n       Wget can be instructed to convert the links in downloaded files to point at the local files, for\r\n       offline viewing.\r\n<\/pre>\n<h3>5. nslookup, dig, host<\/h3>\n<p>These three utilities &#8211; nslookup, dig, and host &#8211; are part of the bind utilities. They are the basic tools for DNS client and DNS server troubleshooting.<\/p>\n<p>Examples:<\/p>\n<pre>[root@rhel62 ~]# nslookup\r\n&gt; set type=mx\r\n&gt; webhostinggeeks-dev2.com\r\nServer:         8.8.8.8\r\nAddress:        8.8.8.8#53\r\n\r\nNon-authoritative answer:\r\nwebhostinggeeks-dev2.com   mail exchanger = 0 webhostinggeeks-dev2.com.\r\n\r\nAuthoritative answers can be found from:\r\n&gt;\r\n<\/pre>\n<pre>[root@rhel62 ~]# dig webhostinggeeks-dev2.com\r\n\r\n; &lt; &lt;&gt;&gt; DiG 9.7.3-P3-RedHat-9.7.3-8.P3.el6 &lt; &lt;&gt;&gt; webhostinggeeks-dev2.com\r\n;; global options: +cmd\r\n;; Got answer:\r\n;; -&gt;&gt;HEADER&lt;<\/pre>\n<pre>[root@rhel62 ~]# host -t mx webhostinggeeks-dev2.com\r\nwebhostinggeeks-dev2.com mail is handled by 0 webhostinggeeks-dev2.com.\r\n<\/pre>\n<h2>Installation of Utilities<\/h2>\n<p>To install these utilities, you can simply run the following command:<\/p>\n<pre>\r\n[root@rhel62 ~]# yum install wget telnet openssh-clients bind-utils man -y\r\n<\/pre>\n<h2>Commands Mentioned<\/h2>\n<ul>\n<li><span class=\"fw-bold\">wget<\/span> \u2013 Retrieves files from the web using HTTP and FTP protocols<\/li>\n<li><span class=\"fw-bold\">telnet<\/span> \u2013 A network protocol used for accessing remote computers<\/li>\n<li><span class=\"fw-bold\">scp<\/span> \u2013 A remote file copy utility that uses ssh for data transfer<\/li>\n<li><span class=\"fw-bold\">man<\/span> \u2013 Displays the manual page for other commands<\/li>\n<li><span class=\"fw-bold\">nslookup<\/span> \u2013 A utility for DNS client and server troubleshooting<\/li>\n<li><span class=\"fw-bold\">dig<\/span> \u2013 Another utility for DNS client and server troubleshooting<\/li>\n<li><span class=\"fw-bold\">host<\/span> \u2013 A utility for DNS client and server troubleshooting<\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>In conclusion, these seven utilities &#8211; wget, telnet, scp, man, nslookup, dig, and host &#8211; are essential tools for any Linux server administrator. They enhance the functionality of your system and aid in troubleshooting various issues. By understanding what each utility does and how to use it, you can significantly improve your efficiency and effectiveness as a server administrator.<\/p>\n<p>Remember, the installation of these utilities is straightforward and can be done with a single command. However, always ensure that you understand the purpose and function of each utility before using it. This will help you avoid potential issues and make the most of these powerful tools.<\/p>\n<p>For more in-depth information about various server types, you can visit the following pages:<\/p>\n<ul>\n<li><a href=\"https:\/\/webhostinggeeks.com\/best\/web-server\/\">Best web servers<\/a><\/li>\n<li><a href=\"https:\/\/webhostinggeeks.com\/blog\/apache-http-server-explained\/\">Apache<\/a><\/li>\n<li><a href=\"https:\/\/webhostinggeeks.com\/blog\/nginx-server-explained\/\">Nginx<\/a><\/li>\n<li><a href=\"https:\/\/webhostinggeeks.com\/blog\/litespeed-web-server-explained\/\">LiteSpeed<\/a><\/li>\n<li><a href=\"https:\/\/webhostinggeeks.com\/blog\/what-is-dedicated-server-hosting\/\">Dedicated server<\/a><\/li>\n<li><a href=\"https:\/\/webhostinggeeks.com\/blog\/what-is-vps-hosting\/\">VPS server<\/a><\/li>\n<li><a href=\"https:\/\/webhostinggeeks.com\/blog\/what-is-cloud-hosting\/\">Cloud hosting<\/a><\/li>\n<li><a href=\"https:\/\/webhostinggeeks.com\/blog\/what-is-shared-hosting\/\">Shared hosting<\/a><\/li>\n<\/ul>\n<p>These resources provide a wealth of information about servers like Apache, Nginx, LiteSpeed, and various hosting options like dedicated server, VPS server, cloud hosting, and shared hosting.<\/p>\n<h2>FAQs<\/h2>\n<ol itemscope itemtype=\"https:\/\/schema.org\/FAQPage\">\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">What is the purpose of the wget utility?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">Wget is a network utility used to retrieve files from the Web using HTTP and FTP, the two most widely used Internet protocols. It&#8217;s useful for downloading files directly to your server.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">How does the telnet utility aid in troubleshooting?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">Telnet is a network protocol used for accessing remote computers. It&#8217;s particularly useful for troubleshooting as it allows you to verify open ports on your system.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">What does the scp utility do?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">Secure Copy Protocol (scp) is a remote file copy utility that operates between hosts on a network. It uses ssh for data transfer, providing the same level of security and authentication as ssh.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">What is the function of the &#8216;man&#8217; command?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">The &#8216;man&#8217; command is used to display the manual page for other commands, helping to explain their functions. The term &#8216;man&#8217; is short for manual.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">What are nslookup, dig, and host utilities used for?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">nslookup, dig, and host are part of the bind utilities. They are basic tools used for DNS client and DNS server troubleshooting, helping to resolve and investigate DNS-related issues.<\/span>\n            <\/p>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>When setting up a new Linux server, there are several utilities that can significantly enhance your system&#8217;s functionality and ease your troubleshooting process. While most Linux distributions come pre-loaded with&#8230;<\/p>\n","protected":false},"author":6,"featured_media":6280,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[2055],"tags":[1244,1536,1546,1713],"class_list":["post-4472","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","tag-centos","tag-linux","tag-linux-utilities","tag-rhel"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/4472","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=4472"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/4472\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/6280"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=4472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=4472"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=4472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}