<?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>Redhat Archives | Abdul Wahab Junaid</title>
	<atom:link href="https://awjunaid.com/category/redhat/feed/" rel="self" type="application/rss+xml" />
	<link>https://awjunaid.com/category/redhat/</link>
	<description>Offensive Security Researcher &#38; Quantum Cryptography Analyst</description>
	<lastBuildDate>Fri, 25 Aug 2023 01:03:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://i0.wp.com/awjunaid.com/wp-content/uploads/2023/06/cropped-1668274976669.jpeg?fit=32%2C32&#038;ssl=1</url>
	<title>Redhat Archives | Abdul Wahab Junaid</title>
	<link>https://awjunaid.com/category/redhat/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">220030102</site>	<item>
		<title>Adding and Removing Users with useradd, usermod, and userdel in Red Hat</title>
		<link>https://awjunaid.com/redhat/adding-and-removing-users-with-useradd-usermod-and-userdel-in-red-hat/</link>
					<comments>https://awjunaid.com/redhat/adding-and-removing-users-with-useradd-usermod-and-userdel-in-red-hat/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Abdul Wahab Junaid]]></dc:creator>
		<pubDate>Fri, 25 Aug 2023 01:03:08 +0000</pubDate>
				<category><![CDATA[Redhat]]></category>
		<category><![CDATA[linux commands]]></category>
		<category><![CDATA[redhat]]></category>
		<guid isPermaLink="false">https://awjunaid.com/?p=4477</guid>

					<description><![CDATA[<p>The useradd command in Red Hat-based Linux distributions is used to create new user accounts on the system.&#8230;</p>
<p>The post <a href="https://awjunaid.com/redhat/adding-and-removing-users-with-useradd-usermod-and-userdel-in-red-hat/">Adding and Removing Users with useradd, usermod, and userdel in Red Hat</a> appeared first on <a href="https://awjunaid.com">Abdul Wahab Junaid</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">The <code>useradd</code> command in Red Hat-based Linux distributions is used to create new user accounts on the system. It allows you to specify various parameters while creating a user account. Here&#8217;s a table with information and examples related to the <code>useradd</code> command:</p>



<figure class="wp-block-table"><table><thead><tr><th>Parameter</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><code>-c, --comment &lt;comment&gt;</code></td><td>Provide a comment or description for the user</td><td><code>useradd -c "John Doe" john</code></td></tr><tr><td><code>-d, --home &lt;directory&gt;</code></td><td>Set the home directory for the user</td><td><code>useradd -d /home/john john</code></td></tr><tr><td><code>-g, --gid &lt;group&gt;</code></td><td>Set the primary group for the user</td><td><code>useradd -g users john</code></td></tr><tr><td><code>-G, --groups &lt;groups&gt;</code></td><td>Specify additional groups for the user (comma-separated list)</td><td><code>useradd -G developers,admins john</code></td></tr><tr><td><code>-m, --create-home</code></td><td>Create the user&#8217;s home directory if it doesn&#8217;t exist</td><td><code>useradd -m john</code></td></tr><tr><td><code>-s, --shell &lt;shell&gt;</code></td><td>Set the login shell for the user</td><td><code>useradd -s /bin/bash john</code></td></tr><tr><td><code>-u, --uid &lt;UID&gt;</code></td><td>Set the user ID (UID) for the user</td><td><code>useradd -u 1001 john</code></td></tr><tr><td><code>-p, --password &lt;password&gt;</code></td><td>Set the encrypted password for the user</td><td><code>useradd -p 'encrypted_password' john</code></td></tr><tr><td><code>username</code></td><td>The username of the new user</td><td><code>useradd newuser</code></td></tr></tbody></table></figure>



<h2 class="wp-block-heading">Examples:</h2>



<ol class="wp-block-list">
<li>Create a user named &#8220;john&#8221; with a comment:</li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   useradd -c &quot;John Doe&quot; john" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">useradd</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">-c</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">&quot;John Doe&quot;</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">john</span></span></code></pre></div>



<ol class="wp-block-list" start="2">
<li>Create a user named &#8220;john&#8221; with a specific home directory:</li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   useradd -d /home/john john" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">useradd</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">-d</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">/home/john</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">john</span></span></code></pre></div>



<ol class="wp-block-list" start="3">
<li>Create a user named &#8220;john&#8221; and assign them to the &#8220;users&#8221; primary group:</li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   useradd -g users john" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">useradd</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">-g</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">users</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">john</span></span></code></pre></div>



<ol class="wp-block-list" start="4">
<li>Create a user named &#8220;john&#8221; and add them to the &#8220;developers&#8221; and &#8220;admins&#8221; groups:</li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   useradd -G developers,admins john" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">useradd</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">-G</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">developers,admins</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">john</span></span></code></pre></div>



<ol class="wp-block-list" start="5">
<li>Create a user named &#8220;john&#8221; with a home directory and a default login shell:</li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   useradd -m -s /bin/bash john" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">useradd</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">-m</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">-s</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">/bin/bash</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">john</span></span></code></pre></div>



<ol class="wp-block-list" start="6">
<li>Create a user named &#8220;john&#8221; with a specific UID (user ID):</li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   useradd -u 1001 john" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">useradd</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">-u</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">1001</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">john</span></span></code></pre></div>



<ol class="wp-block-list" start="7">
<li>Create a user named &#8220;john&#8221; with a pre-encrypted password:</li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   useradd -p 'encrypted_password' john" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">useradd</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">-p</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">&#39;encrypted_password&#39;</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">john</span></span></code></pre></div>



<ol class="wp-block-list" start="8">
<li>Create a user named &#8220;newuser&#8221;:</li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   useradd newuser" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">useradd</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">newuser</span></span></code></pre></div>



<p class="wp-block-paragraph">Please note that managing user accounts might require administrative privileges (<code>sudo</code>). Additionally, it&#8217;s a good practice to use the <code>passwd</code> command after creating a user to set their password interactively, as storing passwords in plain text or with reversible encryption is not recommended for security reasons.</p>



<figure class="wp-block-table"><table><thead><tr><th>Command</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><code>useradd</code></td><td>Create a new user account with specified parameters</td><td><code>useradd -c "John Doe" -m -s /bin/bash john</code></td></tr><tr><td><code>usermod</code></td><td>Modify existing user account attributes</td><td><code>usermod -aG developers john</code></td></tr><tr><td><code>userdel</code></td><td>Delete a user account and related files</td><td><code>userdel -r john</code></td></tr></tbody></table></figure>



<h2 class="wp-block-heading"><strong>Examples</strong>:</h2>



<ol class="wp-block-list">
<li><strong>useradd</strong>: Create a user named &#8220;john&#8221; with a comment, home directory, and default shell:</li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   useradd -c &quot;John Doe&quot; -m -s /bin/bash john" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">useradd</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">-c</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">&quot;John Doe&quot;</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">-m</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">-s</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">/bin/bash</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">john</span></span></code></pre></div>



<ol class="wp-block-list" start="2">
<li><strong>usermod</strong>: Add user &#8220;john&#8221; to the &#8220;developers&#8221; group:</li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   usermod -aG developers john" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">usermod</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">-aG</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">developers</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">john</span></span></code></pre></div>



<ol class="wp-block-list" start="3">
<li><strong>userdel</strong>: Delete the user &#8220;john&#8221; and remove their home directory and files:</li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   userdel -r john" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">userdel</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">-r</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">john</span></span></code></pre></div>
<p>The post <a href="https://awjunaid.com/redhat/adding-and-removing-users-with-useradd-usermod-and-userdel-in-red-hat/">Adding and Removing Users with useradd, usermod, and userdel in Red Hat</a> appeared first on <a href="https://awjunaid.com">Abdul Wahab Junaid</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://awjunaid.com/redhat/adding-and-removing-users-with-useradd-usermod-and-userdel-in-red-hat/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4477</post-id>	</item>
		<item>
		<title>Managing User Environments in Red Hat</title>
		<link>https://awjunaid.com/redhat/managing-user-environments-in-red-hat/</link>
					<comments>https://awjunaid.com/redhat/managing-user-environments-in-red-hat/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Abdul Wahab Junaid]]></dc:creator>
		<pubDate>Fri, 25 Aug 2023 00:58:08 +0000</pubDate>
				<category><![CDATA[Redhat]]></category>
		<category><![CDATA[linux commands]]></category>
		<category><![CDATA[redhat]]></category>
		<guid isPermaLink="false">https://awjunaid.com/?p=4474</guid>

					<description><![CDATA[<p>Managing user environments in Red Hat is the process of configuring the environment for each user account. This&#8230;</p>
<p>The post <a href="https://awjunaid.com/redhat/managing-user-environments-in-red-hat/">Managing User Environments in Red Hat</a> appeared first on <a href="https://awjunaid.com">Abdul Wahab Junaid</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Managing user environments in Red Hat is the process of configuring the environment for each user account. This includes setting the default shell, the environment variables, and the startup scripts.</p>



<h2 class="wp-block-heading">The user environment can be managed using the following methods:</h2>



<ul class="wp-block-list">
<li><strong>Using the useradd command:</strong> The useradd command is used to create a new user account. When you create a new user account, you can specify the default shell, the environment variables, and the startup scripts.</li>



<li><strong>Using the /etc/skel directory:</strong> The /etc/skel directory contains a set of files that are copied to the home directory of a new user account. These files can be used to set the default shell, the environment variables, and the startup scripts.</li>



<li><strong>Using the /etc/profile file:</strong> The /etc/profile file is executed when the user logs in. It can be used to set environment variables and to run startup scripts.</li>



<li><strong>Using the .bashrc file:</strong> The .bashrc file is executed when the user opens a new shell. It can be used to set environment variables and to run startup scripts.</li>
</ul>



<p class="wp-block-paragraph">The best method for managing user environments will depend on the specific needs of the system.</p>



<h2 class="wp-block-heading">Here are some additional tips for managing user environments in Red Hat:</h2>



<ul class="wp-block-list">
<li>Use descriptive names for user accounts. This will make it easier to identify and manage user accounts.</li>



<li>Use consistent naming conventions for environment variables. This will make it easier to troubleshoot problems.</li>



<li>Use comments in the user configuration files to document the settings. This will make it easier to understand the settings and to make changes in the future.</li>



<li>Back up the user configuration files regularly. This will help to protect the settings in case of a problem.</li>
</ul>
<p>The post <a href="https://awjunaid.com/redhat/managing-user-environments-in-red-hat/">Managing User Environments in Red Hat</a> appeared first on <a href="https://awjunaid.com">Abdul Wahab Junaid</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://awjunaid.com/redhat/managing-user-environments-in-red-hat/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4474</post-id>	</item>
		<item>
		<title>User Configuration Files in Red Hat</title>
		<link>https://awjunaid.com/redhat/user-configuration-files-in-red-hat/</link>
					<comments>https://awjunaid.com/redhat/user-configuration-files-in-red-hat/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Abdul Wahab Junaid]]></dc:creator>
		<pubDate>Fri, 25 Aug 2023 00:55:37 +0000</pubDate>
				<category><![CDATA[Redhat]]></category>
		<category><![CDATA[linux commands]]></category>
		<category><![CDATA[redhat]]></category>
		<guid isPermaLink="false">https://awjunaid.com/?p=4471</guid>

					<description><![CDATA[<p>User configuration files in Red Hat are a set of files that contain configuration data for each user&#8230;</p>
<p>The post <a href="https://awjunaid.com/redhat/user-configuration-files-in-red-hat/">User Configuration Files in Red Hat</a> appeared first on <a href="https://awjunaid.com">Abdul Wahab Junaid</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">User configuration files in Red Hat are a set of files that contain configuration data for each user account. These files are located in the home directory of the user account.</p>



<p class="wp-block-paragraph">The most important user configuration file in Red Hat is the .bashrc file. This file contains shell configuration information, such as the default shell prompt and the aliases for commonly used commands.</p>



<h2 class="wp-block-heading">Other important user configuration files in Red Hat include:</h2>



<ul class="wp-block-list">
<li><strong>.profile:</strong> This file is executed when the user logs in. It can be used to set environment variables and to run startup scripts.</li>



<li><strong>.bash_aliases:</strong> This file contains aliases for commonly used commands.</li>



<li><strong>.bash_history:</strong> This file contains a history of the commands that the user has typed.</li>



<li><strong>.vimrc:</strong> This file contains Vim configuration information.</li>



<li><strong>.gitconfig:</strong> This file contains Git configuration information.</li>
</ul>



<p class="wp-block-paragraph">The user configuration files are important for customizing the user&#8217;s environment and for making the system more user-friendly.</p>



<h2 class="wp-block-heading">Here are some additional user configuration files in Red Hat:</h2>



<ul class="wp-block-list">
<li><strong>.Xdefaults:</strong> This file contains X Window System configuration information.</li>



<li><strong>.gconf:</strong> This file contains GNOME configuration information.</li>



<li><strong>.kde:</strong> This file contains KDE configuration information.</li>



<li><strong>.tmux.conf:</strong> This file contains Tmux configuration information.</li>



<li><strong>.zshrc:</strong> This file contains Zsh configuration information.</li>
</ul>



<p class="wp-block-paragraph">The user configuration files can be edited using a text editor. When editing these files, it is important to be careful not to make any changes that could break the system.</p>
<p>The post <a href="https://awjunaid.com/redhat/user-configuration-files-in-red-hat/">User Configuration Files in Red Hat</a> appeared first on <a href="https://awjunaid.com">Abdul Wahab Junaid</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://awjunaid.com/redhat/user-configuration-files-in-red-hat/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4471</post-id>	</item>
		<item>
		<title>Xload command in Red Hat and it perimeters</title>
		<link>https://awjunaid.com/redhat/xload-command-in-red-hat-and-it-perimeters/</link>
					<comments>https://awjunaid.com/redhat/xload-command-in-red-hat-and-it-perimeters/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Abdul Wahab Junaid]]></dc:creator>
		<pubDate>Fri, 25 Aug 2023 00:52:19 +0000</pubDate>
				<category><![CDATA[Redhat]]></category>
		<category><![CDATA[linux commands]]></category>
		<category><![CDATA[redhat]]></category>
		<guid isPermaLink="false">https://awjunaid.com/?p=4468</guid>

					<description><![CDATA[<p>The xload command is used to display a graphical representation of the system load average on the X&#8230;</p>
<p>The post <a href="https://awjunaid.com/redhat/xload-command-in-red-hat-and-it-perimeters/">Xload command in Red Hat and it perimeters</a> appeared first on <a href="https://awjunaid.com">Abdul Wahab Junaid</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">The <code>xload</code> command is used to display a graphical representation of the system load average on the X Window System (GUI) in Red Hat-based Linux distributions. It provides a visual indication of how busy the system&#8217;s CPU is over a period of time. Here&#8217;s a table with information and examples related to the <code>xload</code> command:</p>



<figure class="wp-block-table"><table><thead><tr><th>Command</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><code>xload</code></td><td>Display the graphical load average meter</td><td><code>xload</code></td></tr><tr><td><code>xload -geometry &lt;geometry&gt;</code></td><td>Specify window size and position</td><td><code>xload -geometry 200x200+100+100</code></td></tr></tbody></table></figure>



<h2 class="wp-block-heading">Examples:</h2>



<ol class="wp-block-list">
<li><strong>Display the graphical load average meter:</strong></li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   xload" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">xload</span></span></code></pre></div>



<ol class="wp-block-list" start="2">
<li><strong>Specify the window size and position using the <code>-geometry</code> option:</strong></li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   xload -geometry 200x200+100+100" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">xload</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">-geometry</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">200</span><span style="color: #E6DB74">x200+100+100</span></span></code></pre></div>



<p class="wp-block-paragraph">This will open the <code>xload</code> window with a size of 200&#215;200 pixels and positioned at coordinates (100, 100) on the screen.</p>



<p class="wp-block-paragraph">Keep in mind that <code>xload</code> provides a basic visual representation of the system&#8217;s load average. However, for more detailed and comprehensive system monitoring and performance analysis, you might want to explore other tools like <code>top</code>, <code>htop</code>, or dedicated monitoring solutions such as Nagios, Zabbix, or Grafana.</p>
<p>The post <a href="https://awjunaid.com/redhat/xload-command-in-red-hat-and-it-perimeters/">Xload command in Red Hat and it perimeters</a> appeared first on <a href="https://awjunaid.com">Abdul Wahab Junaid</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://awjunaid.com/redhat/xload-command-in-red-hat-and-it-perimeters/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4468</post-id>	</item>
		<item>
		<title>oprofile command in Red Hat and it perimeters</title>
		<link>https://awjunaid.com/redhat/oprofile-command-in-red-hat-and-it-perimeters/</link>
					<comments>https://awjunaid.com/redhat/oprofile-command-in-red-hat-and-it-perimeters/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Abdul Wahab Junaid]]></dc:creator>
		<pubDate>Fri, 25 Aug 2023 00:46:37 +0000</pubDate>
				<category><![CDATA[Redhat]]></category>
		<category><![CDATA[linux commands]]></category>
		<category><![CDATA[redhat]]></category>
		<guid isPermaLink="false">https://awjunaid.com/?p=4465</guid>

					<description><![CDATA[<p>oprofile is a profiling tool in Red Hat-based Linux distributions that helps analyze the performance of applications and&#8230;</p>
<p>The post <a href="https://awjunaid.com/redhat/oprofile-command-in-red-hat-and-it-perimeters/">oprofile command in Red Hat and it perimeters</a> appeared first on <a href="https://awjunaid.com">Abdul Wahab Junaid</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><code>oprofile</code> is a profiling tool in Red Hat-based Linux distributions that helps analyze the performance of applications and system behavior. It focuses on collecting statistical data about the execution of programs, including information about CPU usage, cache misses, and more. Table with information and examples related to the <code>oprofile</code> command:</p>



<figure class="wp-block-table"><table><thead><tr><th>Command</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><code>opcontrol --start</code></td><td>Start profiling data collection</td><td><code>opcontrol --start</code></td></tr><tr><td><code>opcontrol --stop</code></td><td>Stop profiling data collection</td><td><code>opcontrol --stop</code></td></tr><tr><td><code>opreport</code></td><td>Display profiling report</td><td><code>opreport</code></td></tr><tr><td><code>ophelp</code></td><td>List available events and options</td><td><code>ophelp</code></td></tr><tr><td><code>opcontrol --status</code></td><td>Check the status of oprofile</td><td><code>opcontrol --status</code></td></tr><tr><td><code>opannotate &lt;binary&gt;</code></td><td>Annotate a binary with profiling data</td><td><code>opannotate /path/to/executable</code></td></tr><tr><td><code>opcontrol --reset</code></td><td>Reset profiling data</td><td><code>opcontrol --reset</code></td></tr><tr><td><code>opcontrol --deinit</code></td><td>Deinitialize oprofile</td><td><code>opcontrol --deinit</code></td></tr><tr><td><code>opcontrol --setup</code></td><td>Configure oprofile settings</td><td><code>opcontrol --setup</code></td></tr></tbody></table></figure>



<h2 class="wp-block-heading">Examples:</h2>



<ol class="wp-block-list">
<li><strong>Start profiling data collection:</strong></li>
</ol>



<pre class="wp-block-code"><code>   opcontrol --start</code></pre>



<ol class="wp-block-list" start="2">
<li><strong>Stop profiling data collection:</strong></li>
</ol>



<pre class="wp-block-code"><code>   opcontrol --stop</code></pre>



<ol class="wp-block-list" start="3">
<li><strong>Display a profiling report:</strong></li>
</ol>



<pre class="wp-block-code"><code>   opreport</code></pre>



<ol class="wp-block-list" start="4">
<li><strong>List available events and options:</strong></li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   ophelp" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">ophelp</span></span></code></pre></div>



<ol class="wp-block-list" start="5">
<li><strong>Check the status of oprofile:</strong></li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   opcontrol --status" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">opcontrol</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">--status</span></span></code></pre></div>



<ol class="wp-block-list" start="6">
<li><strong>Annotate a binary with profiling data:</strong></li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   opannotate /path/to/executable" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">opannotate</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">/path/to/executable</span></span></code></pre></div>



<ol class="wp-block-list" start="7">
<li><strong>Reset profiling data:</strong></li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   opcontrol --reset" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">opcontrol</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">--reset</span></span></code></pre></div>



<ol class="wp-block-list" start="8">
<li><strong>Deinitialize oprofile:</strong></li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   opcontrol --deinit" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">opcontrol</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">--deinit</span></span></code></pre></div>



<ol class="wp-block-list" start="9">
<li><strong>Configure oprofile settings:</strong></li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   opcontrol --setup" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">opcontrol</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">--setup</span></span></code></pre></div>



<p class="wp-block-paragraph">Remember that <code>oprofile</code> provides deep insights into how your programs utilize system resources, but understanding and interpreting the results might require familiarity with performance analysis concepts. Additionally, <code>oprofile</code> may have limited support on newer systems, as it&#8217;s gradually being replaced by more advanced profiling tools and techniques.</p>
<p>The post <a href="https://awjunaid.com/redhat/oprofile-command-in-red-hat-and-it-perimeters/">oprofile command in Red Hat and it perimeters</a> appeared first on <a href="https://awjunaid.com">Abdul Wahab Junaid</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://awjunaid.com/redhat/oprofile-command-in-red-hat-and-it-perimeters/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4465</post-id>	</item>
		<item>
		<title>perf command in Red Hat and it perimeters</title>
		<link>https://awjunaid.com/redhat/perf-command-in-red-hat-and-it-perimeters/</link>
					<comments>https://awjunaid.com/redhat/perf-command-in-red-hat-and-it-perimeters/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Abdul Wahab Junaid]]></dc:creator>
		<pubDate>Fri, 25 Aug 2023 00:41:27 +0000</pubDate>
				<category><![CDATA[Redhat]]></category>
		<category><![CDATA[linux commands]]></category>
		<category><![CDATA[redhat]]></category>
		<guid isPermaLink="false">https://awjunaid.com/?p=4462</guid>

					<description><![CDATA[<p>The perf command in Red Hat-based Linux distributions is a powerful tool used for performance analysis and profiling&#8230;</p>
<p>The post <a href="https://awjunaid.com/redhat/perf-command-in-red-hat-and-it-perimeters/">perf command in Red Hat and it perimeters</a> appeared first on <a href="https://awjunaid.com">Abdul Wahab Junaid</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">The <code>perf</code> command in Red Hat-based Linux distributions is a powerful tool used for performance analysis and profiling of applications and the system. It provides insights into various aspects of system performance, including CPU usage, memory usage, disk I/O, and more. Here&#8217;s a table with information and examples related to the <code>perf</code> command:</p>



<figure class="wp-block-table"><table><thead><tr><th>Command</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><code>perf record &lt;command&gt;</code></td><td>Record events for a specified command</td><td><code>perf record ls</code></td></tr><tr><td><code>perf report</code></td><td>Generate a report from recorded data</td><td><code>perf report</code></td></tr><tr><td><code>perf top</code></td><td>Display live summary of top events</td><td><code>perf top</code></td></tr><tr><td><code>perf stat &lt;command&gt;</code></td><td>Display statistics for a specified command</td><td><code>perf stat ls</code></td></tr><tr><td><code>perf record -e &lt;event&gt; &lt;command&gt;</code></td><td>Record specific events for a specified command</td><td><code>perf record -e cpu-cycles ls</code></td></tr><tr><td><code>perf script</code></td><td>Generate a script from recorded data for custom analysis</td><td><code>perf script</code></td></tr><tr><td><code>perf record -F &lt;frequency&gt; &lt;command&gt;</code></td><td>Record events with a specified frequency</td><td><code>perf record -F 99 sleep 5</code></td></tr><tr><td><code>perf mem</code></td><td>Memory profiling using hardware counters</td><td><code>perf mem record ls</code></td></tr></tbody></table></figure>



<h2 class="wp-block-heading">Examples:</h2>



<ol class="wp-block-list">
<li><strong>Record events for a specific command:</strong></li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   perf record ls" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">perf</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">record</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">ls</span></span></code></pre></div>



<ol class="wp-block-list" start="2">
<li><strong>Generate a report from recorded data:</strong></li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   perf report" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">perf</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">report</span></span></code></pre></div>



<ol class="wp-block-list" start="3">
<li><strong>Display live summary of top events:</strong></li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   perf top" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">perf</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">top</span></span></code></pre></div>



<ol class="wp-block-list" start="4">
<li><strong>Display statistics for a specified command:</strong></li>
</ol>



<pre class="wp-block-code"><code>   perf stat ls</code></pre>



<ol class="wp-block-list" start="5">
<li><strong>Record specific events for a specified command:</strong></li>
</ol>



<pre class="wp-block-code"><code>   perf record -e cpu-cycles ls</code></pre>



<ol class="wp-block-list" start="6">
<li><strong>Generate a script from recorded data for custom analysis:</strong></li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   perf script" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">perf</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">script</span></span></code></pre></div>



<ol class="wp-block-list" start="7">
<li><strong>Record events with a specified frequency (e.g., 99 Hz) for a command:</strong></li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   perf record -F 99 sleep 5" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">perf</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">record</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">-F</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">99</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">sleep</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">5</span></span></code></pre></div>



<ol class="wp-block-list" start="8">
<li><strong>Perform memory profiling using hardware counters:</strong></li>
</ol>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="   perf mem record ls" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #F8F8F2">   </span><span style="color: #A6E22E">perf</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">mem</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">record</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">ls</span></span></code></pre></div>



<p class="wp-block-paragraph">Keep in mind that the <code>perf</code> tool provides a wide range of capabilities, and the examples above cover only a fraction of its features. The tool offers detailed insights into the performance of your system and applications, but understanding and interpreting its output may require some familiarity with performance analysis concepts.</p>
<p>The post <a href="https://awjunaid.com/redhat/perf-command-in-red-hat-and-it-perimeters/">perf command in Red Hat and it perimeters</a> appeared first on <a href="https://awjunaid.com">Abdul Wahab Junaid</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://awjunaid.com/redhat/perf-command-in-red-hat-and-it-perimeters/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4462</post-id>	</item>
		<item>
		<title>Performance Analysis Tools and Processes in Red Hat</title>
		<link>https://awjunaid.com/redhat/performance-analysis-tools-and-processes-in-red-hat/</link>
					<comments>https://awjunaid.com/redhat/performance-analysis-tools-and-processes-in-red-hat/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Abdul Wahab Junaid]]></dc:creator>
		<pubDate>Fri, 25 Aug 2023 00:37:32 +0000</pubDate>
				<category><![CDATA[Redhat]]></category>
		<category><![CDATA[linux commands]]></category>
		<category><![CDATA[redhat]]></category>
		<guid isPermaLink="false">https://awjunaid.com/?p=4459</guid>

					<description><![CDATA[<p>There are a number of performance analysis tools and processes available in Red Hat. These tools can be&#8230;</p>
<p>The post <a href="https://awjunaid.com/redhat/performance-analysis-tools-and-processes-in-red-hat/">Performance Analysis Tools and Processes in Red Hat</a> appeared first on <a href="https://awjunaid.com">Abdul Wahab Junaid</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">There are a number of performance analysis tools and processes available in Red Hat. These tools can be used to collect data about the system&#8217;s performance, identify bottlenecks, and make recommendations for improvement.</p>



<h2 class="wp-block-heading">Some of the most popular performance analysis tools in Red Hat include:</h2>



<ul class="wp-block-list">
<li><strong>top:</strong> This tool displays a real-time view of the running processes on the system. It can be used to identify processes that are consuming a lot of CPU or memory resources.</li>



<li><strong>vmstat:</strong> This tool displays a snapshot of the system&#8217;s memory, CPU, and I/O statistics. It can be used to identify trends in the system&#8217;s performance.</li>



<li><strong>sar:</strong> This tool collects and displays system activity data over a period of time. It can be used to identify performance problems that are intermittent or that occur only under certain conditions.</li>



<li><strong>perf:</strong> This tool is used to collect and analyze performance data from the Linux kernel. It can be used to identify performance problems that are caused by the kernel or by hardware devices.</li>



<li><strong>oprofile:</strong> This tool is used to collect and analyze performance data from user-space applications. It can be used to identify performance problems that are caused by applications or by the way they are being used.</li>
</ul>



<p class="wp-block-paragraph">In addition to these tools, there are a number of other performance analysis tools available for Red Hat. The best tool for a particular situation will depend on the specific problem that is being investigated.</p>



<h2 class="wp-block-heading">The performance analysis process typically involves the following steps:</h2>



<ol class="wp-block-list">
<li><strong>Identify the problem:</strong> The first step is to identify the performance problem that needs to be addressed. This can be done by monitoring the system&#8217;s performance and looking for trends or anomalies.</li>



<li><strong>Collect data:</strong> The next step is to collect data about the system&#8217;s performance. This can be done using the performance analysis tools mentioned above.</li>



<li><strong>Analyze the data:</strong> Once the data has been collected, it needs to be analyzed to identify the root cause of the performance problem.</li>



<li><strong>Make recommendations:</strong> Once the root cause of the problem has been identified, recommendations can be made for improvement. These recommendations may include changes to the system configuration, the application code, or the hardware.</li>
</ol>



<p class="wp-block-paragraph">The performance analysis process can be a complex and time-consuming task. However, it is essential for ensuring that the system is performing at its best.</p>
<p>The post <a href="https://awjunaid.com/redhat/performance-analysis-tools-and-processes-in-red-hat/">Performance Analysis Tools and Processes in Red Hat</a> appeared first on <a href="https://awjunaid.com">Abdul Wahab Junaid</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://awjunaid.com/redhat/performance-analysis-tools-and-processes-in-red-hat/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4459</post-id>	</item>
		<item>
		<title>System Logs: /var/log and syslogd in Red Hat</title>
		<link>https://awjunaid.com/redhat/system-logs-var-log-and-syslogd-in-red-hat/</link>
					<comments>https://awjunaid.com/redhat/system-logs-var-log-and-syslogd-in-red-hat/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Abdul Wahab Junaid]]></dc:creator>
		<pubDate>Fri, 25 Aug 2023 00:31:21 +0000</pubDate>
				<category><![CDATA[Redhat]]></category>
		<category><![CDATA[linux commands]]></category>
		<category><![CDATA[redhat]]></category>
		<guid isPermaLink="false">https://awjunaid.com/?p=4456</guid>

					<description><![CDATA[<p>In Red Hat, system logs are stored in the /var/log directory. This directory contains a number of different&#8230;</p>
<p>The post <a href="https://awjunaid.com/redhat/system-logs-var-log-and-syslogd-in-red-hat/">System Logs: /var/log and syslogd in Red Hat</a> appeared first on <a href="https://awjunaid.com">Abdul Wahab Junaid</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">In Red Hat, system logs are stored in the /var/log directory. This directory contains a number of different log files, each of which contains information about a different aspect of the system.</p>



<p class="wp-block-paragraph">The most important system log file in Red Hat is the /var/log/messages file. This file contains all general system messages, such as boot messages, startup messages, and error messages.</p>



<h2 class="wp-block-heading">Other important system log files in Red Hat include:</h2>



<ul class="wp-block-list">
<li><strong>/var/log/secure:</strong> This file contains security-related messages, such as login attempts and failed password attempts.</li>



<li><strong>/var/log/auth.log:</strong> This file contains authentication-related messages, such as successful and failed login attempts.</li>



<li><strong>/var/log/cron:</strong> This file contains messages from the cron daemon, which is used to run tasks at scheduled times.</li>



<li><strong>/var/log/boot.log:</strong> This file contains messages from the boot process.</li>



<li><strong>/var/log/dmesg:</strong> This file contains kernel messages, such as messages about hardware devices and kernel errors.</li>
</ul>



<p class="wp-block-paragraph">The syslogd daemon is responsible for collecting and storing system logs. Syslogd is configured in the /etc/syslog.conf file. This file specifies the location of the log files, the types of messages that should be logged, and the priority of the messages.</p>



<p class="wp-block-paragraph">The syslogd daemon can be configured to send log messages to a remote server. This can be useful for centralized logging and for troubleshooting problems on remote systems.</p>



<p class="wp-block-paragraph"><strong>To view the system logs, you can use the following command:</strong></p>



<pre class="wp-block-code"><code>less /var/log/messages</code></pre>



<p class="wp-block-paragraph">This command will open the /var/log/messages file in a text editor. You can then scroll through the file to view the messages.</p>



<p class="wp-block-paragraph"><strong>You can also use the following command to view the system logs in real time:</strong></p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#F8F8F2;--cbp-line-number-width:8.4375px;--cbp-line-highlight-color:rgba(253, 253, 237, 0.2);line-height:1.25rem"><span style="display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#34362e;color:#efefe1">Bash</span><span role="button" tabindex="0" data-code="tail -f /var/log/messages" style="color:#F8F8F2;display:none" aria-label="Copy" class="code-block-pro-copy-button"><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki monokai" style="background-color: #272822" tabindex="0"><code><span class="line"><span style="color: #A6E22E">tail</span><span style="color: #F8F8F2"> </span><span style="color: #AE81FF">-f</span><span style="color: #F8F8F2"> </span><span style="color: #E6DB74">/var/log/messages</span></span></code></pre></div>



<p class="wp-block-paragraph">This command will continuously display the latest messages in the /var/log/messages file.</p>
<p>The post <a href="https://awjunaid.com/redhat/system-logs-var-log-and-syslogd-in-red-hat/">System Logs: /var/log and syslogd in Red Hat</a> appeared first on <a href="https://awjunaid.com">Abdul Wahab Junaid</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://awjunaid.com/redhat/system-logs-var-log-and-syslogd-in-red-hat/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4456</post-id>	</item>
		<item>
		<title>Configuration Directories and Files in Red Hat</title>
		<link>https://awjunaid.com/redhat/configuration-directories-and-files-in-red-hat/</link>
					<comments>https://awjunaid.com/redhat/configuration-directories-and-files-in-red-hat/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Abdul Wahab Junaid]]></dc:creator>
		<pubDate>Fri, 25 Aug 2023 00:27:26 +0000</pubDate>
				<category><![CDATA[Redhat]]></category>
		<category><![CDATA[linux commands]]></category>
		<category><![CDATA[redhat]]></category>
		<guid isPermaLink="false">https://awjunaid.com/?p=4453</guid>

					<description><![CDATA[<p>The configuration directories and files in Red Hat are a set of directories and files that contain configuration&#8230;</p>
<p>The post <a href="https://awjunaid.com/redhat/configuration-directories-and-files-in-red-hat/">Configuration Directories and Files in Red Hat</a> appeared first on <a href="https://awjunaid.com">Abdul Wahab Junaid</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">The configuration directories and files in Red Hat are a set of directories and files that contain configuration data for various system components. These directories and files are located in the /etc directory.</p>



<h2 class="wp-block-heading">Some of the most important configuration directories and files in Red Hat include:</h2>



<ul class="wp-block-list">
<li><strong>/etc/sysconfig:</strong> This directory contains system-wide configuration files, such as the /etc/sysconfig/network file, which contains network configuration information.</li>



<li><strong>/etc/default:</strong> This directory contains default configuration files for various system services, such as the /etc/default/ssh file, which contains default configuration information for the ssh service.</li>



<li><strong>/etc/init.d:</strong> This directory contains init scripts, which are used to start, stop, and manage system services.</li>



<li><strong>/etc/logrotate.d:</strong> This directory contains log rotation configuration files, which are used to rotate log files.</li>



<li><strong>/etc/pam.d:</strong> This directory contains PAM configuration files, which are used to control access to system resources.</li>



<li><strong>/etc/rc.d:</strong> This directory contains rc scripts, which are used to start and stop system services during system boot and shutdown.</li>
</ul>



<p class="wp-block-paragraph">The configuration directories and files are important for the proper functioning of the Red Hat system. It is important to be familiar with these directories and files in order to troubleshoot system problems and manage the system.</p>



<h2 class="wp-block-heading">Here are some additional configuration directories and files in Red Hat:</h2>



<ul class="wp-block-list">
<li><strong>/etc/cron.d:</strong> This directory contains cron job configuration files, which are used to run tasks at scheduled times.</li>



<li><strong>/etc/fstab:</strong> This file contains the filesystem table, which lists the mounted filesystems and their mount options.</li>



<li><strong>/etc/passwd:</strong> This file contains user account information, such as user names, passwords, and home directories.</li>



<li><strong>/etc/group:</strong> This file contains group information, such as group names, group IDs, and group members.</li>



<li><strong>/etc/hosts:</strong> This file contains the hostname and IP address for the local system.</li>



<li><strong>/etc/resolv.conf:</strong> This file contains the nameservers and search domains for the local system.</li>
</ul>
<p>The post <a href="https://awjunaid.com/redhat/configuration-directories-and-files-in-red-hat/">Configuration Directories and Files in Red Hat</a> appeared first on <a href="https://awjunaid.com">Abdul Wahab Junaid</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://awjunaid.com/redhat/configuration-directories-and-files-in-red-hat/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4453</post-id>	</item>
		<item>
		<title>System Directories in Red Hat</title>
		<link>https://awjunaid.com/redhat/system-directories-in-red-hat/</link>
					<comments>https://awjunaid.com/redhat/system-directories-in-red-hat/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Abdul Wahab Junaid]]></dc:creator>
		<pubDate>Fri, 25 Aug 2023 00:22:53 +0000</pubDate>
				<category><![CDATA[Redhat]]></category>
		<category><![CDATA[linux commands]]></category>
		<category><![CDATA[redhat]]></category>
		<guid isPermaLink="false">https://awjunaid.com/?p=4448</guid>

					<description><![CDATA[<p>The system directories in Red Hat are a set of directories that contain important system files and configuration&#8230;</p>
<p>The post <a href="https://awjunaid.com/redhat/system-directories-in-red-hat/">System Directories in Red Hat</a> appeared first on <a href="https://awjunaid.com">Abdul Wahab Junaid</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">The system directories in Red Hat are a set of directories that contain important system files and configuration data. These directories are located in the root directory of the filesystem (/).</p>



<h2 class="wp-block-heading">Some of the most important system directories in Red Hat include:</h2>



<ul class="wp-block-list">
<li><strong>/bin:</strong> This directory contains essential system commands, such as ls, cp, and mv.</li>



<li><strong>/etc:</strong> This directory contains system configuration files, such as the /etc/passwd file, which contains user account information.</li>



<li><strong>/lib:</strong> This directory contains shared libraries that are used by system programs.</li>



<li><strong>/opt:</strong> This directory is used for optional software packages.</li>



<li><strong>/sbin:</strong> This directory contains system administration commands, such as reboot and shutdown.</li>



<li><strong>/usr:</strong> This directory contains user-accessible files and programs.</li>



<li><strong>/var:</strong> This directory contains variable data, such as log files and mail spools.</li>
</ul>



<p class="wp-block-paragraph">The system directories are important for the proper functioning of the Red Hat system. It is important to be familiar with these directories and their contents in order to troubleshoot system problems and manage the system.</p>



<h2 class="wp-block-heading">Here are some additional system directories in Red Hat:</h2>



<ul class="wp-block-list">
<li><strong>/boot:</strong> This directory contains the boot loader and kernel files.</li>



<li><strong>/dev:</strong> This directory contains device files, which represent hardware devices on the system.</li>



<li><strong>/home:</strong> This directory contains the home directories for all users.</li>



<li><strong>/lost+found:</strong> This directory contains files that were not properly written to disk.</li>



<li><strong>/proc:</strong> This directory contains information about running processes and the system kernel.</li>



<li><strong>/srv:</strong> This directory contains site-specific data that is served by the system.</li>
</ul>
<p>The post <a href="https://awjunaid.com/redhat/system-directories-in-red-hat/">System Directories in Red Hat</a> appeared first on <a href="https://awjunaid.com">Abdul Wahab Junaid</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://awjunaid.com/redhat/system-directories-in-red-hat/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4448</post-id>	</item>
	</channel>
</rss>
