<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>OS Grove</title>
	<atom:link href="http://www.osgrove.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osgrove.com</link>
	<description>Linux and Windows Tutorials</description>
	<lastBuildDate>Sat, 24 Apr 2021 11:47:43 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.7.1</generator>

<image>
	<url>https://www.osgrove.com/wp-content/uploads/2021/03//cropped-favicon-32x32.png</url>
	<title>OS Grove</title>
	<link>https://www.osgrove.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Install Apache JMeter on CentOS 8 / RHEL 8</title>
		<link>https://www.osgrove.com/how-to-install-apache-jmeter-on-centos-8-rhel-8/</link>
					<comments>https://www.osgrove.com/how-to-install-apache-jmeter-on-centos-8-rhel-8/#respond</comments>
		
		<dc:creator><![CDATA[Muhammad Nabeel Shafiq]]></dc:creator>
		<pubDate>Sat, 24 Apr 2021 10:23:52 +0000</pubDate>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">https://www.osgrove.com/?p=2619</guid>

					<description><![CDATA[<p>The Apache JMeter is an open source software. It is a pure Java application designed to load test functional behavior and measure performance. The application was originally designed for testing Web Applications but has since expanded to other test functions. It may be used to test performance both on static and dynamic resources, Web dynamic [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osgrove.com/how-to-install-apache-jmeter-on-centos-8-rhel-8/">How to Install Apache JMeter on CentOS 8 / RHEL 8</a> appeared first on <a rel="nofollow" href="https://www.osgrove.com">OS Grove</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>The Apache JMeter is an open source software. It is a pure Java application designed to load test functional behavior and measure performance. The application was originally designed for testing Web Applications but has since expanded to other test functions. It may be used to test performance both on static and dynamic resources, Web dynamic applications.<br>We can also use it to simulate a heavy load on a server, group of servers, network or object to test its strength or to analyze overall performance under different load types. In this article you will learn, how to install Apache JMeter on CentOS 8 / RHEL 8</p>



<p><strong>Features:</strong></p>



<ul><li>Ability to load and performance test many different applications/server/protocol types. like (FTP, SMTP, TCP, Apache etc)</li><li>Generate Dynamic HTML report.</li><li>Extract data in HTML, JSON , XML or any textual format formats.</li><li>Portability and 100% Java purity.</li><li>Multi-threading, testing and debugging.</li><li>CLI mode (Command-line mode) to load test from any Java compatible OS.</li><li>Caching and offline analysis/replaying of test results.</li></ul>



<h4>Install JAVA on CentOS 8 / RHEL 8</h4>



<p>JMeter is compatible with Java version 8 or higher. so first, we have to install Java to run it normally.</p>



<pre class="wp-block-preformatted">dnf install java-11-openjdk-devel -y</pre>



<p>Installation done, now you can verify Java version using below command:</p>



<pre class="wp-block-preformatted">java -version</pre>



<h4>Install Apache JMeter on CentOS 8 / RHEL 8</h4>



<p>You can also download latest binary release from its <a href="https://jmeter.apache.org/download_jmeter.cgi"><strong>website</strong></a>.</p>



<p>Download it using below command</p>



<pre class="wp-block-preformatted">cd<br>wget https://downloads.apache.org//jmeter/binaries/apache-jmeter-5.4.1.tgz<br>ls</pre>



<p>Now unpack downloaded package</p>



<pre class="wp-block-preformatted">tar zxvf apache-jmeter-5.4.1.tgz<br>ls</pre>



<p>Once its done there is no need to install it, just go to <strong>apache-jmeter-5.4.1/bin</strong> directory and run Jmeter using below commands.</p>



<pre class="wp-block-preformatted">cd apache-jmeter-5.4.1/bin/
./jmeter</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="593" src="https://www.osgrove.com/wp-content/uploads/2021/04/Apache-Jmeter-1-1024x593.jpg" alt="" class="wp-image-2648" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/Apache-Jmeter-1-1024x593.jpg 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/Apache-Jmeter-1-300x174.jpg 300w, https://www.osgrove.com/wp-content/uploads/2021/04/Apache-Jmeter-1-768x445.jpg 768w, https://www.osgrove.com/wp-content/uploads/2021/04/Apache-Jmeter-1.jpg 1339w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Finally its done. Now you can start using JMeter to run load testing tool for analyzing and measuring the performance of a variety of services.</p>
<p>The post <a rel="nofollow" href="https://www.osgrove.com/how-to-install-apache-jmeter-on-centos-8-rhel-8/">How to Install Apache JMeter on CentOS 8 / RHEL 8</a> appeared first on <a rel="nofollow" href="https://www.osgrove.com">OS Grove</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osgrove.com/how-to-install-apache-jmeter-on-centos-8-rhel-8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Use of Kill process in Linux</title>
		<link>https://www.osgrove.com/use-of-kill-process-in-linux/</link>
					<comments>https://www.osgrove.com/use-of-kill-process-in-linux/#respond</comments>
		
		<dc:creator><![CDATA[ihsan saleem]]></dc:creator>
		<pubDate>Fri, 23 Apr 2021 05:59:14 +0000</pubDate>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[HUP]]></category>
		<category><![CDATA[Kill]]></category>
		<category><![CDATA[PID]]></category>
		<guid isPermaLink="false">https://www.osgrove.com/?p=2595</guid>

					<description><![CDATA[<p>Most processes have their own strategies for closing down. Shockingly, processes can breakdown and not permit themselves to be closed down. If a running background measure is unresponsive, it gets important to use a command to kill it.A process is the instance of a computer program that is being executed by one or many threads. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osgrove.com/use-of-kill-process-in-linux/">Use of Kill process in Linux</a> appeared first on <a rel="nofollow" href="https://www.osgrove.com">OS Grove</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Most processes have their own strategies for closing down. Shockingly, processes can breakdown and not permit themselves to be closed down. If a running background measure is unresponsive, it gets important to use a command to kill it.A process is the instance of a computer program that is being executed by one or many threads. It contains the program code and its activity. Several processes may be associated with the same program for example, opening up several instances of the same program often results in more than one process being executed.</p>



<p>kill is a command that is used in many operating systems to send signals to the running processes. In linux kill command is normally used to terminate running process. The kill command can be executed in many ways. In this very article we gonna cover basics of kill command so you gonna understand and then applies in your environment.</p>



<p>Before kill or terminate any process we must know its process ID (PID) or process name, so to find a process name we have two commands which can be run. First is &#8220;ps&#8221; command and the second it &#8220;top&#8221; command. in this artice we will use ps command to find a process ID and its name.</p>



<p>Find process using ps command</p>



<p>ps command used to check processes, the below command is used to list all running processes.</p>



<pre class="wp-block-preformatted">ps aux</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="527" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/kill1-1024x527.png" alt="" class="wp-image-2597" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/kill1-1024x527.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/kill1-300x154.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/kill1-768x395.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/kill1-1536x790.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/kill1.png 1898w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>a:</strong> Show processes for all users<br><strong>u:</strong> Display the user who is using the process<br><strong>x:</strong> Show all processes. (It shows the processes running in a GUI environment)</p>



<h3>List specific process ID</h3>



<p>If you want to search any specific process you can use any of following three Procedure.</p>



<p><strong>Procedure 1:</strong></p>



<pre class="wp-block-preformatted">ps -aux | grep process-name</pre>



<p>We gonna check for <strong>vsftpd(FTP server)</strong> process</p>



<pre class="wp-block-preformatted">ps -aux | grep vsftpd</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="84" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/kill2-1024x84.png" alt="" class="wp-image-2598" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/kill2-1024x84.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/kill2-300x25.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/kill2-768x63.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/kill2-1536x126.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/kill2.png 1898w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>As you can see process ID of <strong>vsftpd</strong> in following image.</p>



<p><strong>Procedure 2: </strong>Use <strong>pidof</strong> command</p>



<pre class="wp-block-preformatted">pidof vsftpd</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="90" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/kill3-1024x90.png" alt="" class="wp-image-2599" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/kill3-1024x90.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/kill3-300x26.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/kill3-768x67.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/kill3-1536x135.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/kill3.png 1901w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h4>Sample outputs:</h4>



<p><strong>17702</strong></p>



<p><strong>Procedure 3:</strong> Use pgrep command</p>



<p>pgrep vsftpd</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="72" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/kill4-1024x72.png" alt="" class="wp-image-2600" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/kill4-1024x72.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/kill4-300x21.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/kill4-768x54.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/kill4-1536x108.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/kill4.png 1897w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>All above Procedure gonna show you process ID&#8217;s of vsftpd process.</p>



<h4>Kill Process</h4>



<p>kill command used to terminate or kill running processes.</p>



<p><strong>Procedure 1:</strong> Kill process by its process ID</p>



<p>Now I will kill one vsftpd process using its process ID.</p>



<pre class="wp-block-preformatted">kill -9 17702</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="69" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/kill5-1024x69.png" alt="" class="wp-image-2601" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/kill5-1024x69.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/kill5-300x20.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/kill5-768x51.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/kill5-1536x103.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/kill5.png 1895w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>now verify that <strong>PID</strong> is killed</p>



<pre class="wp-block-preformatted">pidof vsftpd</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="52" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/kill6-1024x52.png" alt="" class="wp-image-2602" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/kill6-1024x52.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/kill6-300x15.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/kill6-768x39.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/kill6-1536x79.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/kill6.png 1895w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>You can see in below image that process <strong>17702</strong> is no more exist.</p>



<p><strong>Procedure 2:</strong> Kill process by its name</p>



<p>If you want to kill all the processes of a service you can use this method.</p>



<pre class="wp-block-preformatted">kill -9 vsftpd</pre>



<p>OR</p>



<pre class="wp-block-preformatted">pkill vsftpd</pre>



<p>Now verify that process is killed</p>



<pre class="wp-block-preformatted">pidof vsftpd</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="52" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/kill6-1-1024x52.png" alt="" class="wp-image-2603" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/kill6-1-1024x52.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/kill6-1-300x15.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/kill6-1-768x39.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/kill6-1-1536x79.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/kill6-1.png 1895w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Now you will see that all processes of vsftpd will no more exist.</p>



<p>Kill all processes of a User</p>



<p>To show all running processes of a user, run below command</p>



<pre class="wp-block-preformatted">ps -fu user-name</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="118" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/kill7-1024x118.png" alt="" class="wp-image-2604" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/kill7-1024x118.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/kill7-300x35.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/kill7-768x88.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/kill7-1536x177.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/kill7.png 1895w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Now you will get process ID&#8217;s of that user. E.g I show process ID&#8217;s of  user &#8220;<strong>osgrove</strong>&#8221; in above image</p>



<p>Now run below command to kill all processes of that user.<br>You need to make sure that you are going to use following command while your are login on a root user. On other hand if you run following command while working from a user then your session will be terminated.</p>



<pre class="wp-block-preformatted">kill -HUP process-ids</pre>



<pre class="wp-block-preformatted">kill -HUP 46397 46406 46416 46417 46421 46476</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="70" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/kill8-1024x70.png" alt="" class="wp-image-2605" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/kill8-1024x70.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/kill8-300x21.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/kill8-768x53.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/kill8-1536x105.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/kill8.png 1897w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Now when you run following command again there you gonna see no result of it.</p>



<pre class="wp-block-preformatted">ps -fu user-name</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="72" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/kill9-1024x72.png" alt="" class="wp-image-2606" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/kill9-1024x72.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/kill9-300x21.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/kill9-768x54.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/kill9-1536x108.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/kill9.png 1897w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>That&#8217;s about i</strong>t.<br>Now you get enough idea that how to kill running processes in linux.</p>
<p>The post <a rel="nofollow" href="https://www.osgrove.com/use-of-kill-process-in-linux/">Use of Kill process in Linux</a> appeared first on <a rel="nofollow" href="https://www.osgrove.com">OS Grove</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osgrove.com/use-of-kill-process-in-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to configure Acl in Linux</title>
		<link>https://www.osgrove.com/how-to-configure-acl-in-linux/</link>
					<comments>https://www.osgrove.com/how-to-configure-acl-in-linux/#respond</comments>
		
		<dc:creator><![CDATA[ihsan saleem]]></dc:creator>
		<pubDate>Tue, 20 Apr 2021 10:49:21 +0000</pubDate>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Acess Control List]]></category>
		<category><![CDATA[ACL]]></category>
		<guid isPermaLink="false">https://www.osgrove.com/?p=2540</guid>

					<description><![CDATA[<p>An ACL specifies which users or system processes are granted access to objects, as well as what operations are allowed on given objects.Access control list (ACL) provides an additional, more flexible permission mechanism for file systems. It is designed to assist with UNIX file permissions. Each entry in a typical ACL specifies a subject and [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osgrove.com/how-to-configure-acl-in-linux/">How to configure Acl in Linux</a> appeared first on <a rel="nofollow" href="https://www.osgrove.com">OS Grove</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><br>An ACL specifies which users or system processes are granted access to objects, as well as what operations are allowed on given objects.Access control list (ACL) provides an additional, more flexible permission mechanism for file systems. It is designed to assist with UNIX file permissions. Each entry in a typical ACL specifies a subject and an operation. ACL allows you to give permissions for any user or group to any disc resource.</p>



<p>There are two types of ACLs:<br><br><strong>1- Access ACL</strong><br><strong>2- Default ACL</strong></p>



<h2>Access ACL</h2>



<p>Access ACL are utilized to give assurance for a file system object.</p>



<h2>Default ACL</h2>



<p>Default ACL can only be applied to a directory. If files/folders placed under that directory won&#8217;t have a ACL set, they inherit the default ACL of their parent directory .<br>ACLs can be configured per user, per group, or per user not in the owning group of a file and also can be configured using UMASK.<br>Permissions must be defined in characters <strong>r,w</strong> and <strong>x</strong> in ACLs.<br>ACLs are set and removed using setfacl, with either the <strong>-m</strong> or <strong>-x </strong>options, respectively.</p>



<h2>Configure Access ACL:</h2>



<p>Setting ACL on a folder for users.</p>



<p>First we gonna create multiple users &#8220;<strong>zack</strong>&#8221; and &#8220;<strong>zeeshan</strong>&#8220;</p>



<pre class="wp-block-preformatted">useradd zack<br>useradd zeeshan</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="119" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/acl1-1024x119.png" alt="" class="wp-image-2544" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/acl1-1024x119.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/acl1-300x35.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/acl1-768x90.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/acl1-1536x179.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/acl1.png 1896w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Then, create a example directory which we gonna use for ACL.</p>



<pre class="wp-block-preformatted">mkdir exampledir<br>ls -lh</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="126" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/acl2-1024x126.png" alt="" class="wp-image-2545" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/acl2-1024x126.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/acl2-300x37.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/acl2-768x94.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/acl2-1536x189.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/acl2.png 1895w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Then set Access ACL on that directory</p>



<pre class="wp-block-preformatted">setfacl -R -m u:zack:rwx exampledir<br>setfacl -R -m u:zeeshan:r-x exampledir</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="92" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/acl3-1024x92.png" alt="" class="wp-image-2546" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/acl3-1024x92.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/acl3-300x27.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/acl3-768x69.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/acl3-1536x138.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/acl3.png 1901w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Setfacl Command to set ACL<br><strong>-R</strong> recursively for directory.<br><strong>-m</strong> to add or modify acl.<br>  <strong>u </strong>used for user.<br> <strong>rwx</strong> permissions read, write and execute.<br><br>Now run following command</p>



<pre class="wp-block-preformatted">ls -lh</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="117" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/acl4-1024x117.png" alt="" class="wp-image-2547" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/acl4-1024x117.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/acl4-300x34.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/acl4-768x87.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/acl4-1536x175.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/acl4.png 1897w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Now we will see a plus <strong>(+)</strong> sign along with permissions section of exampledir folder. It shows that ACL is set on that file/folder.</p>



<h2>List configured ACL</h2>



<p>Command to see configured ACLs is getfacl</p>



<pre class="wp-block-preformatted">getfacl exampledir</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="185" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/acl5-1024x185.png" alt="" class="wp-image-2548" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/acl5-1024x185.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/acl5-300x54.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/acl5-768x138.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/acl5-1536x277.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/acl5.png 1897w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Now user zack has full permissions on testdir he can create, modify files/folder in exampledir.<br>But user zeeshan has limited permissions on testdir he cannot create files/folder in exampledir.</p>



<p><strong>Set acl on a folder for a group</strong></p>



<p>First create a group &#8220;<strong>admin</strong>&#8221; then, create a new directory.</p>



<pre class="wp-block-preformatted">groupadd admin<br>mkdir newexampledir<br>ls -lh</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="157" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/acl6-1024x157.png" alt="" class="wp-image-2549" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/acl6-1024x157.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/acl6-300x46.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/acl6-768x118.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/acl6-1536x235.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/acl6.png 1898w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>Now set ACL on created directory.</strong></p>



<pre class="wp-block-preformatted">setfacl -R -m g:admin:rwx newexampledir</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="76" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/acl7-1024x76.png" alt="" class="wp-image-2550" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/acl7-1024x76.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/acl7-300x22.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/acl7-768x57.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/acl7-1536x113.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/acl7.png 1897w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>g It is used to set ACL on group</p>



<p>Now all the member of &#8220;admin&#8221; group will have rwx permissions on newexampledir folder.</p>



<pre class="wp-block-preformatted">getfacl newexampledir</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="190" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/acl8-1024x190.png" alt="" class="wp-image-2551" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/acl8-1024x190.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/acl8-300x56.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/acl8-768x143.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/acl8-1536x285.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/acl8.png 1896w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Set acl on a folder for a group and a user.<br>Always keep in mind users have high priority then groups in ACL.</p>



<p>Create a group &#8220;<strong>support</strong>&#8220;</p>



<pre class="wp-block-preformatted">groupadd support</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="66" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/acl9-1024x66.png" alt="" class="wp-image-2552" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/acl9-1024x66.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/acl9-300x19.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/acl9-768x49.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/acl9-1536x99.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/acl9.png 1898w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Then, create two users and assign them &#8220;support&#8221; group</p>



<pre class="wp-block-preformatted">useradd razee -g support<br>useradd zaheer -g support</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="135" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/acl11-1024x135.png" alt="" class="wp-image-2554" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/acl11-1024x135.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/acl11-300x39.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/acl11-768x101.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/acl11-1536x202.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/acl11.png 1900w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h5>Now, create a exmp folder</h5>



<pre class="wp-block-preformatted">mkdir exmp <br> ls -lh </pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="135" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/acl11-2-1024x135.png" alt="" class="wp-image-2556" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/acl11-2-1024x135.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/acl11-2-300x39.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/acl11-2-768x101.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/acl11-2-1536x202.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/acl11-2.png 1900w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p> set ACL for &#8220;<strong>support</strong>&#8221; group and &#8220;<strong>razee</strong>&#8221; user</p>



<pre class="wp-block-preformatted"> setfacl -R -m g:support:rwx exmp
 setfacl -R -m u:razee:r-x exmp
 getfacl test
</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="219" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/acl12-1024x219.png" alt="" class="wp-image-2557" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/acl12-1024x219.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/acl12-300x64.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/acl12-768x164.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/acl12-1536x328.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/acl12.png 1897w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>In above scenario both users razee and zaheer are member of support group.<br>but user razee is also have separate acl for it. (It means user razee acl has high priority over group acl).<br>zaheer has full access on exmp folder, e.g. he can make files/folders in that folder.<br>But razee cannot create files/folders in exmp folder because he do not has full w(write) permission.</p>



<h4>Set ACL for others</h4>



<p>we will set it on exmp folder.<br>Let&#8217;s for instance azam is other user. It means he is not the owner nor the member of that &#8220;exmp&#8221; folder&#8217;s group.</p>



<pre class="wp-block-preformatted">useradd azam<br>setfacl -R -m o:r-x exmp<br>getfacl exmp</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="228" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/acl13-1024x228.png" alt="" class="wp-image-2558" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/acl13-1024x228.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/acl13-300x67.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/acl13-768x171.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/acl13-1536x343.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/acl13.png 1897w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Now user <strong>azam</strong> has read and execute permissions on exmp folder. It means it can read all files folders under exmp folder.</p>



<p>Assign full permissions to user &#8220;azam&#8221;</p>



<pre class="wp-block-preformatted">setfacl -R -m o:rwx exmp<br>getfacl exmp</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="183" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/acl14-1024x183.png" alt="" class="wp-image-2559" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/acl14-1024x183.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/acl14-300x54.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/acl14-768x138.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/acl14-1536x275.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/acl14.png 1898w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Now user azam has full permissions on exmp folder. It means it can read, write, modify files folders under exmp folder.</p>



<p>Remove all Permission from user &#8220;<strong>azam</strong>&#8220;</p>



<pre class="wp-block-preformatted">setfacl -R -m o:--- exmp<br>getfacl exmp</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="214" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/acl15-1024x214.png" alt="" class="wp-image-2560" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/acl15-1024x214.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/acl15-300x63.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/acl15-768x161.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/acl15-1536x321.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/acl15.png 1897w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Now user <strong>azam</strong> has no permissions on exmp folder. It means it cannot go to <strong>exmp</strong> folder.</p>



<p>To remove single/desired ACL from a file/folder.<br>we will remove ACL of user <strong>zack</strong> from <strong>exampledir</strong> folder.</p>



<pre class="wp-block-preformatted">setfacl -R -x u:zack exmp<br>getfacl exmp</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="220" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/acl16-1024x220.png" alt="" class="wp-image-2561" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/acl16-1024x220.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/acl16-300x64.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/acl16-768x165.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/acl16-1536x329.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/acl16.png 1898w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>x it is used to remove ACL</p>



<p>To remove all the ACLs from a file/folder:<br>we will remove ACLS from exmp folder</p>



<pre class="wp-block-preformatted">setfacl -R -b exmp<br>getfacl exmp</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="185" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/acl17-1024x185.png" alt="" class="wp-image-2562" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/acl17-1024x185.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/acl17-300x54.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/acl17-768x139.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/acl17-1536x277.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/acl17.png 1901w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>-b</strong> used to remove all ACLs</p>



<p><strong>Default ACL</strong></p>



<p>The default <strong>ACL</strong> is a specific type of permissions assigned to a directory, default ACL doesn’t change the permissions of the directory itself, but specified permission in that ACL will set by default on all the folders which will be created inside of it for specified user, group and other users.<br>We can say the default ACL permissions on parent directory inherit by subdirectories.</p>



<p>We will set default <strong>ACL</strong> for user <strong>zeeshan</strong>.</p>



<pre class="wp-block-preformatted">mkdir exampledir1
setfacl -m d:u:zeeshan:rx exampledir1
getfacl exampledir1</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="244" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/acl18-1024x244.png" alt="" class="wp-image-2563" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/acl18-1024x244.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/acl18-300x71.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/acl18-768x183.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/acl18-1536x366.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/acl18.png 1898w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>d</strong> it used to set default ACL.</p>



<p>Now each directory created under test directory will have default permission of <strong>rx</strong> for user <strong>zeeshan</strong>.</p>



<p>Now we will set default <strong>ACL</strong> for group <strong>admin</strong>.</p>



<pre class="wp-block-preformatted">setfacl -m d:g:admin:rwx exampledir1<br>getfacl exampledir1</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="251" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/acl19-1024x251.png" alt="" class="wp-image-2564" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/acl19-1024x251.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/acl19-300x73.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/acl19-768x188.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/acl19-1536x376.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/acl19.png 1898w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>We will set default <strong>ACL </strong>for other</p>



<pre class="wp-block-preformatted">setfacl -m d:o:--- exampledir1
getfacl exampledir1</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="249" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/acl20-1024x249.png" alt="" class="wp-image-2565" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/acl20-1024x249.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/acl20-300x73.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/acl20-768x187.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/acl20-1536x374.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/acl20.png 1897w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>That&#8217;s about it.</p>
<p>The post <a rel="nofollow" href="https://www.osgrove.com/how-to-configure-acl-in-linux/">How to configure Acl in Linux</a> appeared first on <a rel="nofollow" href="https://www.osgrove.com">OS Grove</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osgrove.com/how-to-configure-acl-in-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Use of Top Command in Linux</title>
		<link>https://www.osgrove.com/use-of-top-command-in-linux/</link>
					<comments>https://www.osgrove.com/use-of-top-command-in-linux/#respond</comments>
		
		<dc:creator><![CDATA[ihsan saleem]]></dc:creator>
		<pubDate>Sun, 18 Apr 2021 16:35:34 +0000</pubDate>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://www.osgrove.com/?p=2458</guid>

					<description><![CDATA[<p>top (table of process) command allows users to monitor processes, CPU information and memory utilization in Linux. It is pre-installed on all linux distributions. In this article we will learn that how to use top command. Run top command and it will show the following top PID: Shows each task unique process id.PR: shows task [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osgrove.com/use-of-top-command-in-linux/">Use of Top Command in Linux</a> appeared first on <a rel="nofollow" href="https://www.osgrove.com">OS Grove</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>top (table of process) command allows users to monitor processes, CPU information and memory utilization in Linux. It is pre-installed on all linux distributions. In this article we will learn that how to use top command.</p>



<p>Run top command and it will show the following</p>



<pre class="wp-block-preformatted">top
</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="436" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/top2-1024x436.png" alt="" class="wp-image-2460" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/top2-1024x436.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/top2-300x128.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/top2-768x327.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/top2-1536x654.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/top2.png 1895w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>PID</strong>: Shows each task unique process id.<br><strong>PR</strong>: shows task priority<br><strong>SHR</strong>: Represents the amount of shared memory used by a task.<br><strong>VIRT</strong>: Total virtual memory.<br><strong>USER</strong>: User name or owner of task.<br><strong>%CPU</strong>: Represents the CPU usage.<br><strong>TIME+</strong>: CPU Time<br><strong>SHR</strong>: display Shared Memory in kb used by a task.<br><strong>NI</strong>: Shows a Nice Value of task. A Negative nice value means higher priority, and positive Nice value means lower priority.<br><strong>%MEM</strong>: Shows the Memory usage of task.</p>



<p>press &#8220;<strong>q</strong>&#8221; on your keyboard to quite from top.</p>



<h2><br>Highlight Running Process in Top<br></h2>



<p>When you execute top command press &#8220;<strong>z</strong>&#8221; key to highlight running processes.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="521" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/top3-1024x521.png" alt="" class="wp-image-2461" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/top3-1024x521.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/top3-300x153.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/top3-768x391.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/top3-1536x782.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/top3.png 1895w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h2><br>Show Path of Processes<br></h2>



<p>Make sure press &#8220;<strong>c</strong>&#8221; after running top command and it will show the path of processes.
</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="543" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/top4-1024x543.png" alt="" class="wp-image-2462" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/top4-1024x543.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/top4-300x159.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/top4-768x407.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/top4-1536x814.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/top4.png 1891w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h2><br>Kill running process</h2>



<p>After running <strong>Top</strong> command you can see all processes along with their process <strong>ID (PID)</strong></p>



<p>If you want to kill a process,<br>simply run &#8220;<strong>Top</strong>&#8221; command to find your specific process ID,<br>Press &#8220;<strong>k</strong>&#8221; and then type your <strong>PID number</strong><br>and press &#8220;<strong>enter</strong>&#8221; key to kill it.<br></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="533" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/top5-1024x533.png" alt="" class="wp-image-2463" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/top5-1024x533.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/top5-300x156.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/top5-768x399.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/top5-1536x799.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/top5.png 1896w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h2>Renice a Process</h2>



<p>Renice is used to change a process priority.<br>By simply running a &#8220;top&#8221; command you can  find your specific process <strong>ID</strong>.<br></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="351" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/top6-1024x351.png" alt="" class="wp-image-2464" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/top6-1024x351.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/top6-300x103.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/top6-768x263.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/top6-1536x526.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/top6.png 1898w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><br>I will renice the priority of PID 22.<br>Use this command &#8220;<strong>renice -n -10  p22</strong>&#8221; to change the priority of the process. You can select your own <strong>PID</strong>.<br>You gonna see the Old priority and new one.<br><br></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="538" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/top7-1024x538.png" alt="" class="wp-image-2465" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/top7-1024x538.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/top7-300x158.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/top7-768x404.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/top7-1536x808.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/top7.png 1898w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><br>That&#8217;s about it.</p>
<p>The post <a rel="nofollow" href="https://www.osgrove.com/use-of-top-command-in-linux/">Use of Top Command in Linux</a> appeared first on <a rel="nofollow" href="https://www.osgrove.com">OS Grove</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osgrove.com/use-of-top-command-in-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Install Apache Maven on CentOS 8 and RHEL 8</title>
		<link>https://www.osgrove.com/how-to-install-apache-maven-on-centos-8-and-rhel-8/</link>
					<comments>https://www.osgrove.com/how-to-install-apache-maven-on-centos-8-and-rhel-8/#respond</comments>
		
		<dc:creator><![CDATA[Muhammad Nabeel Shafiq]]></dc:creator>
		<pubDate>Fri, 16 Apr 2021 11:39:46 +0000</pubDate>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[RHEL]]></category>
		<guid isPermaLink="false">https://www.osgrove.com/?p=2370</guid>

					<description><![CDATA[<p>Apache Maven is a free and open source tool used primarily for Java projects. Maven can also be used to build and manage projects written in C#, Ruby and other languages. This project is hosted by the Apache Software Foundation. It was formerly part of the Jakarta Project. In this article you will learn what [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osgrove.com/how-to-install-apache-maven-on-centos-8-and-rhel-8/">How to Install Apache Maven on CentOS 8 and RHEL 8</a> appeared first on <a rel="nofollow" href="https://www.osgrove.com">OS Grove</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Apache Maven is a free and open source tool used primarily for Java projects. Maven can also be used to build and manage projects written in C#, Ruby and other languages. This project is hosted by the Apache Software Foundation. It was formerly part of the Jakarta Project. In this article you will learn what how to install Apache Maven on CentOS and RHEL 8.</p>



<h3>Prerequisites</h3>



<p>The instructions assume that you are logged in as root user and JAVA is installed on machine because JAVA is necessary for it.</p>



<h4>Step 1 Install JAVA</h4>



<p>As JAVA is Necessary for Maven so, we need to install Java OpenJDK on CentOS 8 and RHEL 8 using below command.</p>



<pre class="wp-block-preformatted">dnf install java-11-openjdk -y</pre>



<p>Once the installation done. You can verify Java installation using below command.</p>



<pre class="wp-block-preformatted">java -version </pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="139" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/JAVA-1024x139.jpg" alt="" class="wp-image-2371" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/JAVA-1024x139.jpg 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/JAVA-300x41.jpg 300w, https://www.osgrove.com/wp-content/uploads/2021/04/JAVA-768x104.jpg 768w, https://www.osgrove.com/wp-content/uploads/2021/04/JAVA.jpg 1430w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h4><br>Step 2: Download and Install Apache Maven</h4>



<p>You can download latest binary release from <a href="https://maven.apache.org/download.cgi">maven download page</a></p>



<p><strong>Install wget tool</strong></p>



<pre class="wp-block-preformatted">dnf install wget -y</pre>



<p>Then go to <strong>/usr/local/ </strong>directory and download maven.</p>



<pre class="wp-block-preformatted">cd /usr/local/<br>wget https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="141" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/Install-Apache-Maven-1024x141.jpg" alt="" class="wp-image-2372" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/Install-Apache-Maven-1024x141.jpg 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/Install-Apache-Maven-300x41.jpg 300w, https://www.osgrove.com/wp-content/uploads/2021/04/Install-Apache-Maven-768x105.jpg 768w, https://www.osgrove.com/wp-content/uploads/2021/04/Install-Apache-Maven-1536x211.jpg 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/Install-Apache-Maven-2048x281.jpg 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Now, extract the compressed file and rename &#8220;apache-maven-3.6.3&#8221; directory to &#8220;maven&#8221;</p>



<pre class="wp-block-preformatted">tar -xvf apache-maven-3.6.3-bin.tar.gz<br>mv apache-maven-3.6.3 maven</pre>



<p>Finally it has been installed and you can start using it. but, its environment is not configured but we will do that in next step.</p>



<h4>Step 3: Configure Environment for Apache Maven</h4>



<p>Now we are going to setup Apache Maven Environment so all users on the machine can use it.</p>



<p>Go to <strong>/etc/profile</strong>/ directory and create maven.sh file.</p>



<pre class="wp-block-preformatted">cd /etc/profile.d/<br>vi maven.sh</pre>



<p>Now paste below script content in this file</p>



<pre class="wp-block-code"><code>## Apache Maven Environment Variables ##
export M2_HOME=/usr/local/maven
export PATH=${M2_HOME}/bin:${PATH}</code></pre>



<p>Save changes to file and exit.</p>



<p>Make the script file executable and load the environment variable using below commands.</p>



<pre class="wp-block-preformatted">chmod +x /etc/profile.d/maven.sh<br>source /etc/profile.d/maven.sh</pre>



<p>Finally verify Maven installation and its version using below command.</p>



<pre class="wp-block-preformatted">mvn --version</pre>



<p>If everything is successful you will see below output.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="89" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/5-1024x89.jpg" alt="" class="wp-image-2373" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/5-1024x89.jpg 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/5-300x26.jpg 300w, https://www.osgrove.com/wp-content/uploads/2021/04/5-768x67.jpg 768w, https://www.osgrove.com/wp-content/uploads/2021/04/5-1536x133.jpg 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/5.jpg 1579w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>That’s it. The latest version of Maven is now installed on your CentOS system.</p>



<p>You can also learn, how to monitor your Linux machine using SAR commands by <strong><a href="https://www.osgrove.com/sar-command-in-linux/" target="_blank" rel="noreferrer noopener">clicking here</a></strong></p>
<p>The post <a rel="nofollow" href="https://www.osgrove.com/how-to-install-apache-maven-on-centos-8-and-rhel-8/">How to Install Apache Maven on CentOS 8 and RHEL 8</a> appeared first on <a rel="nofollow" href="https://www.osgrove.com">OS Grove</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osgrove.com/how-to-install-apache-maven-on-centos-8-and-rhel-8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Get Hard Disk and Partition Information in Linux</title>
		<link>https://www.osgrove.com/how-to-get-hard-disk-and-partition-information-in-linux/</link>
					<comments>https://www.osgrove.com/how-to-get-hard-disk-and-partition-information-in-linux/#comments</comments>
		
		<dc:creator><![CDATA[ihsan saleem]]></dc:creator>
		<pubDate>Thu, 15 Apr 2021 10:12:53 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<guid isPermaLink="false">https://www.osgrove.com/?p=2353</guid>

					<description><![CDATA[<p>In this very article, we gonna discuss how to use different commands to see hard disks and the partitions on Linux server. It is very important for system administrator to have good knowledge about server hard disk its partitions, consumed space and its filesystem. fdisk command fdisk is a command-line utility that provides disk partitioning [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osgrove.com/how-to-get-hard-disk-and-partition-information-in-linux/">How to Get Hard Disk and Partition Information in Linux</a> appeared first on <a rel="nofollow" href="https://www.osgrove.com">OS Grove</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In this very article, we gonna discuss how to use different commands to see hard disks and the partitions on Linux server. It is very important for system administrator to have good knowledge about server hard disk its partitions, consumed space and its filesystem.</p>



<pre class="wp-block-preformatted">fdisk command</pre>



<p>fdisk is a command-line utility that provides disk partitioning functions. It is used to create, modify or delete the partitions on the linux systems. Use following command to list all hard disks and their partitions.</p>



<pre class="wp-block-preformatted">fdisk -l
</pre>



<p>Small (<strong>&#8211;</strong>l) switch Used to list hard disks partitions</p>



<p>you can see sample output in below image.</p>



<h2>df command</h2>



<p>df (disk free) is a Unix command used to display the amount of available disk space for file systems. It shows File System, Disk Space Usage and mount point of partitions.</p>



<pre class="wp-block-preformatted">df</pre>



<p>to see in human readable form then run following command</p>



<pre class="wp-block-preformatted">df -h
</pre>



<p>You can see disk partitions, disk sizes, amount of space used and available and mount point of the partition in sample image.</p>



<h2>Parted</h2>



<p>Parted is another popular commad line utility which allows you to manage hard disks partitions. In this article we will use parted command to see all available hardisks with their size, avaialble and used space of hard disks and created partitions on the hard disks.</p>



<p>Use following command to list hard disks and their partitions on the system</p>



<pre class="wp-block-preformatted">parted -l
</pre>



<h2>sfdisk</h2>



<p>Lets check one more command which we use to list partitions and hard drives. It&#8217;s quite similar to fdisk command. It shows both physical and logical (virtual) volumes, It provides “<strong>summary</strong>” of physical volumes, partitions information with the start and end cylinders, total blocks, size and File systems.</p>



<pre class="wp-block-preformatted">sfdisk -l
</pre>



<p>That&#8217;s about it.</p>
<p>The post <a rel="nofollow" href="https://www.osgrove.com/how-to-get-hard-disk-and-partition-information-in-linux/">How to Get Hard Disk and Partition Information in Linux</a> appeared first on <a rel="nofollow" href="https://www.osgrove.com">OS Grove</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osgrove.com/how-to-get-hard-disk-and-partition-information-in-linux/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How to copy Folder/File using cp command in Linux</title>
		<link>https://www.osgrove.com/how-to-copy-folder-file-using-cp-command-in-linux/</link>
					<comments>https://www.osgrove.com/how-to-copy-folder-file-using-cp-command-in-linux/#comments</comments>
		
		<dc:creator><![CDATA[ihsan saleem]]></dc:creator>
		<pubDate>Wed, 14 Apr 2021 07:39:19 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<guid isPermaLink="false">https://www.osgrove.com/?p=2325</guid>

					<description><![CDATA[<p>What is cp: cp (copy) is a command in various Unix and Unix-like operating systems for copy files and directories. It creates an exact same image of a file on a disk with new file name. The command has three principal modes of operation, expressed by the types of arguments presented to the program for [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osgrove.com/how-to-copy-folder-file-using-cp-command-in-linux/">How to copy Folder/File using cp command in Linux</a> appeared first on <a rel="nofollow" href="https://www.osgrove.com">OS Grove</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><br><strong>What is cp:</strong><br><br><strong>cp (copy)</strong> is a command in various Unix and Unix-like operating systems for copy files and directories. It creates an exact same image of a file on a disk with new file name. The command has three principal modes of operation, expressed by the types of arguments presented to the program for copying a file to another file, one or more files to a directory, or for copying entire directories to another directory.</p>



<h2>Copy a file<br></h2>



<p>First we gonna create a file &#8220;<strong>example.txt</strong>&#8221; and a directory &#8220;<strong>test</strong>&#8221; using following commands.<br></p>



<pre class="wp-block-preformatted">touch example.txt
mkdir test
ls
</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="81" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/cp1-1024x81.png" alt="" class="wp-image-2327" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/cp1-1024x81.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/cp1-300x24.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/cp1-768x61.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/cp1-1536x121.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/cp1.png 1898w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Now, in the following command we gonna copy a file &#8220;<strong>example.txt</strong>&#8221; to the &#8220;<strong>test</strong>&#8221; directory.<br></p>



<pre class="wp-block-preformatted">cp example.txt test
</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="66" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/cp2-1024x66.png" alt="" class="wp-image-2328" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/cp2-1024x66.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/cp2-300x19.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/cp2-768x49.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/cp2-1536x99.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/cp2.png 1893w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><br>now use following command to check whether <strong>example.txt</strong> file is copied into test directory.</p>



<pre class="wp-block-preformatted">ls test
</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="69" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/cp3-1024x69.png" alt="" class="wp-image-2329" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/cp3-1024x69.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/cp3-300x20.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/cp3-768x52.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/cp3-1536x103.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/cp3.png 1893w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h2><br>Copy multiple files</h2>



<p><br>So in this example we gonna copy multiple files into a directory. Let assume we have many files with <strong>.txt</strong> extension and all we want to copy them in a directory &#8220;<strong>test</strong>&#8221; simply use following command.</p>



<pre class="wp-block-preformatted">cp *.txt test<br>ls test</pre>



<p><strong>* Asterisk</strong> means all files matching with <strong>.txt</strong> extension.</p>



<h2>To Copy a Directory</h2>



<p>Now we will copy a directory into another directory.<br>Note: Always use <strong>-R (capital R)</strong> option whenever you copy a directory so, that complete data having in this directory will also be copied.</p>



<p>We are copying example directory to the test directory.</p>



<pre class="wp-block-preformatted">ls
cp -R example test
</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="84" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/cp4-1024x84.png" alt="" class="wp-image-2330" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/cp4-1024x84.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/cp4-300x25.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/cp4-768x63.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/cp4-1536x126.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/cp4.png 1895w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><br>Now verify <strong>example</strong> directory is copied into <strong>test </strong>directory.</p>



<pre class="wp-block-preformatted">ls test</pre>



<p>That&#8217;s about it.</p>
<p>The post <a rel="nofollow" href="https://www.osgrove.com/how-to-copy-folder-file-using-cp-command-in-linux/">How to copy Folder/File using cp command in Linux</a> appeared first on <a rel="nofollow" href="https://www.osgrove.com">OS Grove</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osgrove.com/how-to-copy-folder-file-using-cp-command-in-linux/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How to edit/modify files with Vim and Vi command</title>
		<link>https://www.osgrove.com/how-to-edit-modify-files-with-vim-and-vi-command/</link>
					<comments>https://www.osgrove.com/how-to-edit-modify-files-with-vim-and-vi-command/#respond</comments>
		
		<dc:creator><![CDATA[ihsan saleem]]></dc:creator>
		<pubDate>Mon, 12 Apr 2021 09:43:06 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<guid isPermaLink="false">https://www.osgrove.com/?p=2303</guid>

					<description><![CDATA[<p>What is Vim? Vim/Vi used to edit or modify a text files in CLI (Command Line Interface). It is most popular and people&#8217;s choice text editor in Linux. We gonna discuss its usage and option. Most often Vim is started to edit a single file with the following command. Vim is nothing but improved version [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osgrove.com/how-to-edit-modify-files-with-vim-and-vi-command/">How to edit/modify files with Vim and Vi command</a> appeared first on <a rel="nofollow" href="https://www.osgrove.com">OS Grove</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h5><strong>What is Vim?</strong></h5>



<p>Vim/Vi used to edit or modify a text files in CLI (Command Line Interface). It is most popular and people&#8217;s choice text editor in Linux. We gonna discuss its usage and option.</p>



<p>Most often Vim is started to edit a single file with the following command. Vim is nothing but improved version of vi command. We can also use vi command for same purpose. You can use according to your choice.</p>



<pre class="wp-block-preformatted">vim file</pre>



<p>If you specify an existing file, then the editor open it for you to edit. Otherwise, you can create a new one.</p>



<pre class="wp-block-preformatted">vim [file_new] or [file_existing]</pre>



<h2>Vim or Vi has two Modes:</h2>



<p><strong>Insert mode</strong> press<strong> i </strong>to insert. We can insert/add text in the file using insert mode.<br><strong>Command mode</strong>  for operations the like saving, exiting from a file etc .</p>



<p><br>I am gonna use test1.txt file for vim command also you can edit any file. Run following command and you gonna get into normal mode.</p>



<pre class="wp-block-preformatted">vim test1.txt</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="161" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/vi-and-vim1-1024x161.png" alt="" class="wp-image-2308" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/vi-and-vim1-1024x161.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/vi-and-vim1-300x47.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/vi-and-vim1-768x121.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/vi-and-vim1-1536x242.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/vi-and-vim1.png 1903w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><br>Now if you want to edit your file, you need to go on insert mode. Press &#8220;i&#8221; for insert mode and now you can add text in the file. It is especially useful for editing programs.</p>



<p>After adding your text, Press &#8220;escape&#8221; key to switch back to normal mode.<br>Now save and exit file by typing <strong>: x</strong> OR <strong>:wq</strong> and press <strong>&#8220;enter&#8221;</strong> key.<br></p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="115" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/vi-and-vim-2-1-1024x115.png" alt="" class="wp-image-2310" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/vi-and-vim-2-1-1024x115.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/vi-and-vim-2-1-300x34.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/vi-and-vim-2-1-768x86.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/vi-and-vim-2-1-1536x172.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/vi-and-vim-2-1.png 1888w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>You can play around with the arrow keys by using the vim movement keys, as follows.</p>



<ul><li><strong>h </strong>left</li><li><strong>j</strong> down</li><li><strong>k</strong> up</li><li><strong>l </strong>right</li></ul>



<h2>Vim commands for Escape/Normal mode.</h2>



<ul><li><strong>:w </strong>save changes to file.</li><li><strong>:wq</strong> save and exit from file.</li><li><strong><strong>: x</strong></strong> save and exit from file.</li><li><strong>:q!</strong> Exit without saving.</li><li><strong>i </strong> is used to insert.</li><li><strong>o</strong> cursor will move to next line to insert.</li><li><strong>x</strong> Delete the character the cursor is on.</li><li><strong>yy</strong> Copy current line.</li><li><strong>Ctrl+b</strong> Go back one page.</li><li><strong>Ctrl+f</strong> Go forward one page.</li><li><strong>p</strong> past copied line or text.</li><li><strong>y4</strong> Copy multiple lines. 4 is the number of lines we want to copy.</li><li><strong>/stringname</strong> to search desired text. String name is the text we want to search.</li><li><strong>n </strong>go to next searched string.</li><li><strong>shft+n</strong> go to previous searched string.</li><li><strong>:%s/oldstring/newstring/g</strong> Replace old text with new text.</li><li><strong>:9 to go line no. 9</strong></li><li><strong>Shift+x</strong> Delete the character before the cursor.</li><li><strong>dd</strong> Delete the current line, also used for delete.</li><li><strong>Shift+d</strong> Delete everything from the cursor to the end of the line.</li><li><strong>u</strong> Undo a line you just deleted.</li><li><strong>Shift+u </strong>Undo all changes to the current line.</li><li><strong>gg </strong>To go on the top of file.</li><li><strong>shft+g</strong> To go to the end of file.</li></ul>



<p>That&#8217;s about it.You can get a handful of experience on vim by using above commands.</p>
<p>The post <a rel="nofollow" href="https://www.osgrove.com/how-to-edit-modify-files-with-vim-and-vi-command/">How to edit/modify files with Vim and Vi command</a> appeared first on <a rel="nofollow" href="https://www.osgrove.com">OS Grove</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osgrove.com/how-to-edit-modify-files-with-vim-and-vi-command/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to use SAR Command in Linux</title>
		<link>https://www.osgrove.com/sar-command-in-linux/</link>
					<comments>https://www.osgrove.com/sar-command-in-linux/#respond</comments>
		
		<dc:creator><![CDATA[Muhammad Nabeel Shafiq]]></dc:creator>
		<pubDate>Sat, 10 Apr 2021 13:41:35 +0000</pubDate>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://www.osgrove.com/?p=2286</guid>

					<description><![CDATA[<p>There are many Linux tools which can be used to analyze and monitor system performance and logs. If you are system/server administrator, then you definitely use such tools to monitor your servers and records its logs. But in this article you will learn about a very useful tool System Activity Report (SAR) which is a [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osgrove.com/sar-command-in-linux/">How to use SAR Command in Linux</a> appeared first on <a rel="nofollow" href="https://www.osgrove.com">OS Grove</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>There are many Linux tools which can be used to analyze and monitor system performance and logs. If you are system/server administrator, then you definitely use such tools to monitor your servers and records its logs. But in this article you will learn about a very useful tool System Activity Report (SAR) which is a Linux/Unix command, used to monitor and report on various system loads. It is used to monitor CPU activity, memory/paging, interrupts, device load, network and swap space utilization. SAR uses <strong>/procfilesystem</strong> for gathering information. </p>



<p>In this article we will install SAR and use it to monitor server.</p>



<h5>Run below command to install SAR on CentOS, RHEL, Fedora</h5>



<pre class="wp-block-preformatted">yum install -y sysstat</pre>



<h5>If you want to install it on Ubuntu run following command</h5>



<pre class="wp-block-preformatted">sudo apt-get install sysstat</pre>



<p>Start and enable SAR service on system boot.</p>



<pre class="wp-block-preformatted">systemctl start sysstat.service<br>systemctl enable sysstat.service<br>systemctl status sysstat.service</pre>



<p>SAR reports are saved in <strong>/var/log/sa</strong> directory. A script &#8220;<strong>sa1</strong>&#8221; logs sar output into sysstat binary log file format, and translate it into human readable format in &#8220;<strong>sar1&#8243;</strong> file.</p>



<p>Each and every sar report saved with current date. E.g if today is <strong>10th</strong> the sar report will save as<strong> sa10</strong> in binary file and <strong>sar10</strong> in human readable file.</p>



<p>So you can use below command to see all sar files.</p>



<pre class="wp-block-preformatted">ls /var/log/sa</pre>



<p>Run below command to see system statistics.</p>



<pre class="wp-block-preformatted">sar</pre>



<p>There are many sar commands but some useful commands are given below.</p>



<p>You can check Server’s average load history using below command.</p>



<pre class="wp-block-preformatted">sar -q</pre>



<p>So if you want to see Memory statistics use following command.</p>



<pre class="wp-block-preformatted">sar -R</pre>



<p>Command to see CPU utilization statistics.</p>



<pre class="wp-block-preformatted">sar -u</pre>



<p>List Memory utilization statistics using <strong>-r</strong> switch with sar command</p>



<pre class="wp-block-preformatted">sar -r</pre>



<p>Check I/O and transfer rate statistics.</p>



<pre class="wp-block-preformatted">sar -b</pre>



<p>Mounted Filesystems statistics.</p>



<pre class="wp-block-preformatted">sar -F</pre>



<p>Check Swap space utilization statistics using following command.</p>



<pre class="wp-block-preformatted">sar -S</pre>



<p>Kernel table statistics.</p>



<pre class="wp-block-preformatted">sar -v</pre>



<p>Paging statistics.</p>



<pre class="wp-block-preformatted">sar -B</pre>



<p>TTY device statistics.</p>



<pre class="wp-block-preformatted">sar -y</pre>



<p>That&#8217;s it, hope you like this article. You can add sar in your administration tools to manage and monitor your server activities.</p>
<p>The post <a rel="nofollow" href="https://www.osgrove.com/sar-command-in-linux/">How to use SAR Command in Linux</a> appeared first on <a rel="nofollow" href="https://www.osgrove.com">OS Grove</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osgrove.com/sar-command-in-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Use of Cat Command in Linux</title>
		<link>https://www.osgrove.com/use-of-cat-command-in-linux/</link>
					<comments>https://www.osgrove.com/use-of-cat-command-in-linux/#respond</comments>
		
		<dc:creator><![CDATA[ihsan saleem]]></dc:creator>
		<pubDate>Fri, 09 Apr 2021 07:32:25 +0000</pubDate>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://www.osgrove.com/?p=2235</guid>

					<description><![CDATA[<p>Cat command used frequently in Linux/Unix similar like Operating Systems. Cat command is used to create files. Whenever you create a new file through Cat command you need to put redirection operator &#8220;&#62;&#8221; between Cat command and name of your file Cat Syntax cat [OPTION] [FILE] View a file Content While using following command it [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osgrove.com/use-of-cat-command-in-linux/">Use of Cat Command in Linux</a> appeared first on <a rel="nofollow" href="https://www.osgrove.com">OS Grove</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Cat command used frequently in Linux/Unix similar like Operating Systems. Cat command is used to create files. Whenever you create a new file through Cat command you need to put redirection operator <strong>&#8220;&gt;&#8221;</strong> between Cat command and name of your file</p>



<h2>Cat Syntax</h2>



<pre class="wp-block-preformatted">cat [OPTION] [FILE]</pre>



<p><strong>View a file Content</strong></p>



<p>While using following command it will display content of <strong>/etc/selinux/config</strong> file</p>



<pre class="wp-block-preformatted">cat /etc/selinux/config
</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="218" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/11-1024x218.png" alt="" class="wp-image-2249" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/11-1024x218.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/11-300x64.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/11-768x163.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/11-1536x327.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/11.png 1891w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>View multiple file content</strong></p>



<p>If you want to see multiple files content, simply type following command</p>



<pre class="wp-block-preformatted">cat newfile1 newfile2 newfile3</pre>



<p>and it&#8217;s gonna list content of all three files respectivily.</p>



<p><strong>Create a File with Cat Command</strong></p>



<pre class="wp-block-preformatted">cat &gt; test1
</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="119" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/22-1024x119.png" alt="" class="wp-image-2250" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/22-1024x119.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/22-300x35.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/22-768x89.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/22-1536x179.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/22.png 1890w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>After that, you can put your desired text into the file and press <strong>CTRL+d</strong> to exit from file. Redirection Operator <strong>&#8220;&gt;&#8221;</strong> used to add text.</p>



<p>Now you gonna see the added text in a test file using following command.</p>



<pre class="wp-block-preformatted">cat test1
</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="96" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/33-1024x96.png" alt="" class="wp-image-2252" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/33-1024x96.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/33-300x28.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/33-768x72.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/33-1536x144.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/33.png 1893w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Note: If you already have an existing file then you add text in it while using Redirection Opertor <strong>&#8220;&gt;&#8221;</strong> it&#8217;s gonna overwrite previous content with new one in doing so, you gonna lose your old data. Check following command for a referance.</p>



<p>In above scenario we have created a test file and added some text in it.</p>



<p>Now we gonna add more text in a test file.</p>



<pre class="wp-block-preformatted">cat &gt; test1
</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="88" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/44-1024x88.png" alt="" class="wp-image-2253" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/44-1024x88.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/44-300x26.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/44-768x66.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/44-1536x132.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/44.png 1896w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>After adding text, press <strong>CTRL+D</strong> to make changes and exit.</p>



<p>Now check &#8220;test&#8221; file again and you will see that previous text has removed and new text taken its place.</p>



<pre class="wp-block-preformatted">cat test1
</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="107" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/55-1024x107.png" alt="" class="wp-image-2254" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/55-1024x107.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/55-300x31.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/55-768x80.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/55-1536x160.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/55.png 1897w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>Append text in a file</strong></p>



<p>Now if you want to add more text in a file without losing existing content use redirection operator <strong>&#8220;&gt;&gt;&#8221;</strong> in a command.</p>



<pre class="wp-block-preformatted">cat &gt;&gt; test1
</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="100" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/66-1024x100.png" alt="" class="wp-image-2255" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/66-1024x100.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/66-300x29.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/66-768x75.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/66-1536x150.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/66.png 1893w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Now see its content and you will see data is appended instead of overwritten.</p>



<pre class="wp-block-preformatted">cat test1
</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="110" src="https://www.osgrove.com/wp-content/plugins_media/2021/04/77-1-1024x110.png" alt="" class="wp-image-2257" srcset="https://www.osgrove.com/wp-content/uploads/2021/04/77-1-1024x110.png 1024w, https://www.osgrove.com/wp-content/uploads/2021/04/77-1-300x32.png 300w, https://www.osgrove.com/wp-content/uploads/2021/04/77-1-768x82.png 768w, https://www.osgrove.com/wp-content/uploads/2021/04/77-1-1536x165.png 1536w, https://www.osgrove.com/wp-content/uploads/2021/04/77-1.png 1893w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Copy multiple files content in a single file.</p>



<p>If you want to copy multiple files data in a single file, simply use following command</p>



<pre class="wp-block-preformatted">cat test1 test2 &gt; test3</pre>



<p>That&#8217;s about it, you get an idea how to use cat command in many ways. See manual using command <strong>&#8220;man cat&#8221;</strong> for more information.</p>
<p>The post <a rel="nofollow" href="https://www.osgrove.com/use-of-cat-command-in-linux/">Use of Cat Command in Linux</a> appeared first on <a rel="nofollow" href="https://www.osgrove.com">OS Grove</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osgrove.com/use-of-cat-command-in-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
