tag:blogger.com,1999:blog-62418810482563482142024-03-13T11:20:23.792-07:00Linux OceanPNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.comBlogger331125tag:blogger.com,1999:blog-6241881048256348214.post-90797690091231441632023-11-02T01:51:00.000-07:002023-11-02T01:51:02.680-07:00Activating newly added HDD in VMWare<p><b>Activating newly added HDD in VMWare</b><br /></p>echo "- - -" > /sys/class/scsi_host/host0/scanPNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-89995591073680158792023-09-22T05:44:00.003-07:002023-09-22T05:44:41.471-07:00CursorAI Prompt: Python code for youtube downloader.<p>CursorAI Prompt: <span>Python code for youtube downloader.</span></p><div style="margin: 0px auto; max-width: none;"><div style="padding: 0px 1rem; position: relative; user-select: text;"><span class="anysphere-markdown-container-root" style="user-select: text;">Sure, you<span> </span>can<span> </span>use<span> </span>the<span> </span><span style="background-color: var(--vscode-textCodeBlock-background); border-radius: 4px; font-family: "Droid Sans Mono", "monospace", monospace; padding: 1px 4px; word-break: break-all;">pytube</span><span> </span>library<span> </span>in<span> </span>Python<span> </span>to<span> </span>download<span> </span>YouTube<span> </span>videos. Here's<span> </span>a<span> </span>simple<span> </span>example:<br /><div style="background-color: var(--vscode-editor-background); border-color: rgba(170, 170, 170, 0.267); border-style: solid; border-width: 1px; box-sizing: border-box; margin-top: 1em; padding: 12px 12px 1px; position: relative; width: 863px;"><div data-keybinding-context="41" data-mode-id="python" style="box-sizing: border-box; position: relative; width: 837px;"><div class="monaco-editor no-user-select showUnused showDeprecated vs-dark" data-uri="aichat-code-block-anysphere://myrvctalux" role="code" style="background-color: var(--vscode-sideBar-background); color: var(--vscode-editor-foreground); height: 162px; overflow: visible; position: relative; text-size-adjust: 100%; width: 837px;"><div class="overflow-guard" data-mprt="3" style="height: 162px; overflow: hidden; position: relative; width: 837px;"><div aria-hidden="true" class="margin" role="presentation" style="background-color: var(--vscode-sideBar-background); contain: strict; height: 162px; position: absolute; top: 0px; transform: translate3d(0px, 0px, 0px); width: 0px;"><div class="glyph-margin" style="height: 162px; left: 0px; position: absolute; top: 0px; width: 0px;"></div><div aria-hidden="true" class="margin-view-zones" role="presentation" style="position: absolute;"></div><div aria-hidden="true" class="margin-view-overlays" role="presentation" style="font-family: "Droid Sans Mono", "monospace", monospace; font-feature-settings: "liga" 0, "calt" 0; font-size: 14px; font-variation-settings: normal; font-weight: normal; height: 162px; letter-spacing: 0px; line-height: 19px; position: absolute; width: 0px;"><div style="height: 19px; position: absolute; top: 0px; width: 0px;"></div><div style="height: 19px; position: absolute; top: 19px; width: 0px;"></div><div style="height: 19px; position: absolute; top: 38px; width: 0px;"></div><div style="height: 19px; position: absolute; top: 57px; width: 0px;"></div><div style="height: 19px; position: absolute; top: 76px; width: 0px;"></div><div style="height: 19px; position: absolute; top: 95px; width: 0px;"></div><div style="height: 19px; position: absolute; top: 114px; width: 0px;"></div><div style="height: 19px; position: absolute; top: 133px; width: 0px;"><div class="current-line" style="box-sizing: border-box; display: block; height: 19px; left: 0px; position: absolute; top: 0px; width: 0px;"></div></div></div></div><div class="monaco-scrollable-element editor-scrollable vs-dark" data-mprt="5" role="presentation" style="height: 162px; left: 0px; overflow: hidden; position: absolute; width: 837px;"><div class="lines-content monaco-editor-background" style="background-color: var(--vscode-sideBar-background); contain: strict; height: 1e+06px; left: 0px; overflow: hidden; position: absolute; top: 0px; transform: translate3d(0px, 0px, 0px); user-select: none; width: 1e+06px;"><div aria-hidden="true" class="view-overlays" role="presentation" style="font-family: "Droid Sans Mono", "monospace", monospace; font-feature-settings: "liga" 0, "calt" 0; font-size: 14px; font-variation-settings: normal; font-weight: normal; height: 0px; letter-spacing: 0px; line-height: 19px; position: absolute; top: 0px; width: 837px;"><div style="height: 19px; position: absolute; top: 0px; width: 837px;"></div><div style="height: 19px; position: absolute; top: 19px; width: 837px;"></div><div style="height: 19px; position: absolute; top: 38px; width: 837px;"></div><div style="height: 19px; position: absolute; top: 57px; width: 837px;"></div><div style="height: 19px; position: absolute; top: 76px; width: 837px;"></div><div style="height: 19px; position: absolute; top: 95px; width: 837px;"></div><div style="height: 19px; position: absolute; top: 114px; width: 837px;"></div><div style="height: 19px; position: absolute; top: 133px; width: 837px;"></div></div><div aria-hidden="true" class="view-rulers" role="presentation"></div><div aria-hidden="true" class="view-zones" role="presentation" style="position: absolute;"></div><div aria-hidden="true" class="view-lines monaco-mouse-cursor-text" data-mprt="7" role="presentation" style="cursor: text; font-family: "Droid Sans Mono", "monospace", monospace; font-feature-settings: "liga" 0, "calt" 0; font-size: 14px; font-variation-settings: normal; font-weight: normal; height: 162px; letter-spacing: 0px; line-height: 19px; position: absolute; user-select: none; white-space: nowrap; width: 837px;"><div class="view-line" style="height: 19px; position: absolute; top: 0px; user-select: none; width: 837px;"><span style="color: #2b00fe; position: relative; z-index: 4;"><span class="mtk18">from</span><span class="mtk1"> pytube </span><span class="mtk18">import</span><span class="mtk1"> YouTube</span></span></div><div class="view-line" style="height: 19px; position: absolute; top: 19px; user-select: none; width: 837px;"><span style="color: #2b00fe; position: relative; z-index: 4;"><span></span></span></div><div class="view-line" style="height: 19px; position: absolute; top: 38px; user-select: none; width: 837px;"><span style="color: #2b00fe; position: relative; z-index: 4;"><span class="mtk6">def</span><span class="mtk1"> </span><span class="mtk16">download_video</span><span class="mtk1 bracket-highlighting-0">(</span><span class="mtk10">url</span><span class="mtk1">, </span><span class="mtk10">path</span><span class="mtk1 bracket-highlighting-0">)</span><span class="mtk1">:</span></span></div><div class="view-line" style="height: 19px; position: absolute; top: 57px; user-select: none; width: 837px;"><span style="color: #2b00fe; position: relative; z-index: 4;"><span class="mtk1"> yt </span><span class="mtk3">=</span><span class="mtk1"> YouTube</span><span class="mtk1 bracket-highlighting-0">(</span><span class="mtk1">url</span><span class="mtk1 bracket-highlighting-0">)</span></span></div><div class="view-line" style="height: 19px; position: absolute; top: 76px; user-select: none; width: 837px;"><span style="color: #2b00fe; position: relative; z-index: 4;"><span class="mtk1"> yt.streams.first</span><span class="mtk1 bracket-highlighting-0">(</span><span class="mtk1 bracket-highlighting-0">)</span><span class="mtk1">.download</span><span class="mtk1 bracket-highlighting-0">(</span><span class="mtk1">path</span><span class="mtk1 bracket-highlighting-0">)</span></span></div><div class="view-line" style="height: 19px; position: absolute; top: 95px; user-select: none; width: 837px;"><span style="color: #2b00fe; position: relative; z-index: 4;"><span></span></span></div><span style="color: #2b00fe;"><br /></span><div class="view-line" style="height: 19px; position: absolute; top: 133px; user-select: none; width: 837px;"><span style="color: #2b00fe; position: relative; z-index: 4;"><span class="mtk1">download_video</span><span class="mtk1 bracket-highlighting-0">(</span><span class="mtk12">'https://www.youtube.com/watch?v=dQw4w9WgXcQ'</span><span class="mtk1">, </span><span class="mtk12">'/path/to/download/directory'</span><span class="mtk1 bracket-highlighting-0">)</span></span><span class="anysphere-markdown-container-root" style="color: #2b00fe; user-select: text;"></span></div></div><div class="contentWidgets" data-mprt="1" style="position: absolute; top: 0px;"></div><div aria-hidden="true" class="cursors-layer cursor-line-style cursor-solid" role="presentation" style="position: absolute; top: 0px; z-index: 4;"><div class="cursor monaco-mouse-cursor-text " style="background-color: #aeafad; border-color: rgb(174, 175, 173); box-sizing: border-box; color: #515052; cursor: text; display: block; font-family: "Droid Sans Mono", "monospace", monospace; font-feature-settings: "liga" 0, "calt" 0; font-size: 14px; font-variation-settings: normal; font-weight: normal; height: 19px; left: 201px; letter-spacing: 0px; line-height: 19px; overflow: hidden; padding-left: 1px; position: absolute; top: 133px; visibility: hidden; width: 2px;"></div></div></div><div aria-hidden="true" class="invisible scrollbar horizontal" role="presentation" style="bottom: 0px; height: 10px; left: 0px; opacity: 0; pointer-events: none; position: absolute; width: 837px;"><div class="slider" style="background: var(--vscode-scrollbarSlider-background); contain: strict; height: 10px; left: 0px; position: absolute; top: 0px; transform: translate3d(0px, 0px, 0px); width: 837px;"></div></div><canvas aria-hidden="true" class="decorationsOverviewRuler" height="162" style="contain: strict; display: block; height: 162px; position: absolute; right: 0px; top: 0px; transform: translate3d(0px, 0px, 0px); width: 0px;" width="0"></canvas><div aria-hidden="true" class="invisible scrollbar vertical" role="presentation" style="box-shadow: 1px 0 0 0 var(--guide-color) inset; height: 162px; opacity: 0; pointer-events: none; position: absolute; right: 0px; top: 0px; width: 0px;"><div class="slider" style="background: var(--vscode-scrollbarSlider-background); contain: strict; height: 162px; left: 0px; position: absolute; top: 0px; transform: translate3d(0px, 0px, 0px); width: 0px;"></div></div></div><div aria-hidden="true" role="presentation" style="width: 837px;"></div><textarea aria-autocomplete="both" aria-haspopup="false" aria-label="The editor is not accessible at this time. Press Shift+Alt+F1 for options." aria-multiline="true" aria-roledescription="editor" autocomplete="off" class="inputarea monaco-mouse-cursor-text" data-mprt="6" role="textbox" spellcheck="false" style="background-color: transparent; border: none; color: transparent; cursor: text; font-family: "Droid Sans Mono", "monospace", monospace; font-feature-settings: "liga" 0, "calt" 0; font-size: 14px; font-variation-settings: normal; font-weight: normal; height: 1px; left: 202px; letter-spacing: 0px; line-height: 19px; margin: 0px; min-height: 0px; min-width: 0px; outline: none !important; overflow: hidden; padding: 0px; position: absolute; resize: none; tab-size: 33.6094px; top: 133px; width: 1px; z-index: -10;" tabindex="0" wrap="off"></textarea><div class="monaco-editor-background textAreaCover" style="background-color: var(--vscode-sideBar-background); height: 0px; left: 0px; position: absolute; top: 0px; width: 0px;"></div><div class="overlayWidgets" data-mprt="4" style="height: 162px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 837px;"></div><div aria-hidden="true" class="minimap slider-mouseover" data-mprt="8" role="presentation" style="height: 162px; left: 0px; position: absolute; width: 0px;"><div class="minimap-shadow-hidden" style="height: 162px; position: absolute; width: 0px;"></div><canvas height="162" style="height: 162px; left: 0px; position: absolute; width: 0px;" width="0"></canvas><canvas class="minimap-decorations-layer" height="162" style="height: 162px; left: 0px; position: absolute; width: 0px;" width="0"></canvas><div class="minimap-slider" style="contain: strict; opacity: 0; position: absolute; transform: translate3d(0px, 0px, 0px); transition: opacity 0.1s linear 0s; width: 0px;"><div class="minimap-slider-horizontal" style="background: var(--vscode-minimapSlider-background); height: 0px; position: absolute; width: 0px;"></div></div></div><div aria-hidden="true" class="blockDecorations-container" role="presentation" style="pointer-events: none; position: absolute; top: 0px;"></div></div><div class="overflowingContentWidgets" data-mprt="2"></div></div></div><div style="display: flex; flex-direction: row; gap: 4px; justify-content: right; position: absolute; right: 4px; top: 0px; transform: translateY(-50%); visibility: visible; z-index: 303;"><div class="codicon codicon-run-aibubble-code" style="-webkit-font-smoothing: antialiased; background: var(--vscode-editorWidget-border); border-radius: 3px; cursor: pointer; display: inline-block; font: 16px / 1 codicon; padding: 2px; text-align: center; text-decoration: none; text-rendering: auto; text-transform: none; user-select: none;"></div><div class="codicon codicon-copy-aibubble-code" style="-webkit-font-smoothing: antialiased; background: var(--vscode-editorWidget-border); border-radius: 3px; cursor: pointer; display: inline-block; font: 16px / 1 codicon; padding: 2px; text-align: center; text-decoration: none; text-rendering: auto; text-transform: none; user-select: none;"></div></div></div><br />This<span> </span>code<span> </span>will<span> </span>download<span> </span>the<span> </span>first<span> </span>stream<span> </span>of<span> </span>the<span> </span>video<span> </span>(usually<span> </span>the<span> </span>highest<span> </span>quality) to<span> </span>the<span> </span>specified<span> </span>path.<br /><br />Please<span> </span>replace<span> </span><span style="background-color: var(--vscode-textCodeBlock-background); border-radius: 4px; font-family: "Droid Sans Mono", "monospace", monospace; padding: 1px 4px; word-break: break-all;">'https://www.youtube.com/watch?v=dQw4w9WgXcQ'</span><span> </span>with<span> </span>your<span> </span>desired<span> </span>YouTube<span> </span>video<span> </span>URL<span> </span>and<span> </span><span style="background-color: var(--vscode-textCodeBlock-background); border-radius: 4px; font-family: "Droid Sans Mono", "monospace", monospace; padding: 1px 4px; word-break: break-all;">'/path/to/download/directory'</span><span> </span>with<span> </span>the<span> </span>path<span> </span>where<span> </span>you<span> </span>want<span> </span>to<span> </span>download<span> </span>the<span> </span>video.<br /><br />Remember<span> </span>to<span> </span>install<span> </span>the<span> </span><span style="background-color: var(--vscode-textCodeBlock-background); border-radius: 4px; font-family: "Droid Sans Mono", "monospace", monospace; padding: 1px 4px; word-break: break-all;">pytube</span><span> </span>library<span> </span>if<span> </span>you<span> </span>haven't<span> </span>already<span> </span>done<span> </span>so. You<span> </span>can<span> </span>install<span> </span>it<span> </span>using<span> </span>pip:<br /><div style="background-color: var(--vscode-editor-background); border-color: rgba(170, 170, 170, 0.267); border-style: solid; border-width: 1px; box-sizing: border-box; margin-top: 1em; padding: 12px 12px 1px; position: relative; width: 863px;"><div data-keybinding-context="42" data-mode-id="shellscript" style="box-sizing: border-box; position: relative; width: 837px;"><div class="monaco-editor no-user-select showUnused showDeprecated vs-dark" data-uri="aichat-code-block-anysphere://oxugdsdofv" role="code" style="background-color: var(--vscode-sideBar-background); height: 29px; overflow: visible; position: relative; width: 837px;"><div class="overflow-guard" data-mprt="3" style="height: 29px; overflow: hidden; position: relative; width: 837px;"><div aria-hidden="true" class="margin" role="presentation" style="background-color: var(--vscode-sideBar-background); contain: strict; height: 29px; position: absolute; top: 0px; transform: translate3d(0px, 0px, 0px); width: 0px;"><div class="glyph-margin" style="height: 29px; left: 0px; position: absolute; top: 0px; width: 0px;"></div><div aria-hidden="true" class="margin-view-zones" role="presentation" style="position: absolute;"></div><div aria-hidden="true" class="margin-view-overlays" role="presentation" style="font-family: "Droid Sans Mono", "monospace", monospace; font-feature-settings: "liga" 0, "calt" 0; font-size: 14px; font-variation-settings: normal; font-weight: normal; height: 29px; letter-spacing: 0px; line-height: 19px; position: absolute; width: 0px;"><div style="height: 19px; position: absolute; top: 0px; width: 0px;"><div class="current-line" style="box-sizing: border-box; display: block; height: 19px; left: 0px; position: absolute; top: 0px; width: 0px;"></div></div></div></div><div class="monaco-scrollable-element editor-scrollable vs-dark" data-mprt="5" role="presentation" style="height: 29px; left: 0px; overflow: hidden; position: absolute; width: 837px;"><div class="lines-content monaco-editor-background" style="background-color: var(--vscode-sideBar-background); contain: strict; height: 1e+06px; left: 0px; overflow: hidden; position: absolute; top: 0px; transform: translate3d(0px, 0px, 0px); user-select: none; width: 1e+06px;"><div aria-hidden="true" class="view-overlays" role="presentation" style="font-family: "Droid Sans Mono", "monospace", monospace; font-feature-settings: "liga" 0, "calt" 0; font-size: 14px; font-variation-settings: normal; font-weight: normal; height: 0px; letter-spacing: 0px; line-height: 19px; position: absolute; top: 0px; width: 837px;"><div style="height: 19px; position: absolute; top: 0px; width: 837px;"></div></div><div aria-hidden="true" class="view-rulers" role="presentation"></div><div aria-hidden="true" class="view-zones" role="presentation" style="position: absolute;"></div><div aria-hidden="true" class="view-lines monaco-mouse-cursor-text" data-mprt="7" role="presentation" style="cursor: text; font-family: "Droid Sans Mono", "monospace", monospace; font-feature-settings: "liga" 0, "calt" 0; font-size: 14px; font-variation-settings: normal; font-weight: normal; height: 29px; letter-spacing: 0px; line-height: 19px; position: absolute; user-select: none; white-space: nowrap; width: 837px;"><div class="view-line" style="height: 19px; position: absolute; top: 0px; user-select: none; width: 837px;"><span style="color: #2b00fe; position: relative; z-index: 4;"><span class="mtk16">pip</span><span class="mtk1"> </span><span class="mtk12">install</span><span class="mtk1"> </span><span class="mtk12">pytube</span></span></div></div><div class="contentWidgets" data-mprt="1" style="position: absolute; top: 0px;"></div><div aria-hidden="true" class="cursors-layer cursor-line-style cursor-solid" role="presentation" style="position: absolute; top: 0px; z-index: 4;"><div class="cursor monaco-mouse-cursor-text " style="background-color: #aeafad; border-color: rgb(174, 175, 173); box-sizing: border-box; cursor: text; display: block; font-family: "Droid Sans Mono", "monospace", monospace; font-feature-settings: "liga" 0, "calt" 0; font-size: 14px; font-variation-settings: normal; font-weight: normal; height: 19px; left: 150px; letter-spacing: 0px; line-height: 19px; overflow: hidden; padding-left: 1px; position: absolute; top: 0px; visibility: hidden; width: 2px;"></div></div></div><div aria-hidden="true" class="invisible scrollbar horizontal" role="presentation" style="bottom: 0px; height: 10px; left: 0px; opacity: 0; pointer-events: none; position: absolute; width: 837px;"><div class="slider" style="background: var(--vscode-scrollbarSlider-background); contain: strict; height: 10px; left: 0px; position: absolute; top: 0px; transform: translate3d(0px, 0px, 0px); width: 837px;"></div></div><canvas aria-hidden="true" class="decorationsOverviewRuler" height="29" style="contain: strict; display: block; height: 29px; position: absolute; right: 0px; top: 0px; transform: translate3d(0px, 0px, 0px); width: 0px;" width="0"></canvas><div aria-hidden="true" class="invisible scrollbar vertical" role="presentation" style="box-shadow: 1px 0 0 0 var(--guide-color) inset; height: 29px; opacity: 0; pointer-events: none; position: absolute; right: 0px; top: 0px; width: 0px;"><div class="slider" style="background: var(--vscode-scrollbarSlider-background); contain: strict; height: 29px; left: 0px; position: absolute; top: 0px; transform: translate3d(0px, 0px, 0px); width: 0px;"></div></div></div><div aria-hidden="true" role="presentation" style="width: 837px;"></div><textarea aria-autocomplete="both" aria-haspopup="false" aria-label="The editor is not accessible at this time. Press Shift+Alt+F1 for options." aria-multiline="true" aria-roledescription="editor" autocomplete="off" class="inputarea monaco-mouse-cursor-text" data-mprt="6" role="textbox" spellcheck="false" style="background-color: transparent; border: medium; color: #2b00fe; cursor: text; font-family: "Droid Sans Mono", "monospace", monospace; font-feature-settings: "liga" 0, "calt" 0; font-size: 14px; font-variation-settings: normal; font-weight: normal; height: 1px; left: 151px; letter-spacing: 0px; line-height: 19px; margin: 0px; min-height: 0px; min-width: 0px; outline: none !important; overflow: hidden; padding: 0px; position: absolute; resize: none; tab-size: 33.6094px; top: 0px; width: 1px; z-index: -10;" tabindex="0" wrap="off"></textarea><div class="monaco-editor-background textAreaCover" style="background-color: var(--vscode-sideBar-background); height: 0px; left: 0px; position: absolute; top: 0px; width: 0px;"></div><div class="overlayWidgets" data-mprt="4" style="height: 29px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 837px;"></div><div aria-hidden="true" class="minimap slider-mouseover" data-mprt="8" role="presentation" style="height: 29px; left: 0px; position: absolute; width: 0px;"><div class="minimap-shadow-hidden" style="height: 29px; position: absolute; width: 0px;"></div><canvas height="29" style="height: 29px; left: 0px; position: absolute; width: 0px;" width="0"></canvas><canvas class="minimap-decorations-layer" height="29" style="height: 29px; left: 0px; position: absolute; width: 0px;" width="0"></canvas><div class="minimap-slider" style="contain: strict; opacity: 0; position: absolute; transform: translate3d(0px, 0px, 0px); transition: opacity 0.1s linear 0s; width: 0px;"><div class="minimap-slider-horizontal" style="background: var(--vscode-minimapSlider-background); height: 0px; position: absolute; width: 0px;"></div></div></div><div aria-hidden="true" class="blockDecorations-container" role="presentation" style="pointer-events: none; position: absolute; top: 0px;"></div></div><div class="overflowingContentWidgets" data-mprt="2"></div></div></div><div style="display: flex; flex-direction: row; gap: 4px; justify-content: right; position: absolute; right: 4px; top: 0px; transform: translateY(-50%); visibility: hidden; z-index: 303;"><div class="codicon codicon-run-aibubble-code" style="-webkit-font-smoothing: antialiased; background: var(--vscode-editorWidget-border); border-radius: 3px; cursor: pointer; display: inline-block; font: 16px / 1 codicon; padding: 2px; text-align: center; text-decoration: none; text-rendering: auto; text-transform: none; user-select: none;"></div><div class="codicon codicon-copy-aibubble-code" style="-webkit-font-smoothing: antialiased; background: var(--vscode-editorWidget-border); border-radius: 3px; cursor: pointer; display: inline-block; font: 16px / 1 codicon; padding: 2px; text-align: center; text-decoration: none; text-rendering: auto; text-transform: none; user-select: none;"></div></div></div><br />Please<span> </span>note<span> </span>that<span> </span>downloading<span> </span>YouTube<span> </span>videos<span> </span>may<span> </span>violate<span> </span>YouTube's<span> </span>terms<span> </span>of<span> </span>service, so<span> </span>use<span> </span>this<span> </span>responsibly.</span></div></div>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-33581719712869151062023-09-22T05:41:00.004-07:002023-09-22T05:41:27.662-07:00Prompt for Python code for creating a webbrowser<p>CursorAI Prompt: Python code for creating a webbrowser <br /></p><div style="background-color: #1f1f1f; color: #cccccc; font-family: 'Droid Sans Mono', 'monospace', monospace; font-size: 14px; font-weight: normal; line-height: 19px; white-space: pre;"><div><span style="color: #c586c0;">import</span><span style="color: #cccccc;"> tkinter </span><span style="color: #c586c0;">as</span><span style="color: #cccccc;"> tk</span></div><div><span style="color: #c586c0;">from</span><span style="color: #cccccc;"> tkinter </span><span style="color: #c586c0;">import</span><span style="color: #cccccc;"> messagebox</span></div><div><span style="color: #c586c0;">import</span><span style="color: #cccccc;"> webbrowser</span></div><br /><div><span style="color: #569cd6;">def</span><span style="color: #cccccc;"> </span><span style="color: #dcdcaa;">open_url</span><span style="color: #cccccc;">():</span></div><div><span style="color: #cccccc;"> url </span><span style="color: #d4d4d4;">=</span><span style="color: #cccccc;"> entry.get()</span></div><div><span style="color: #cccccc;"> webbrowser.open_new(url)</span></div><br /><div><span style="color: #cccccc;">root </span><span style="color: #d4d4d4;">=</span><span style="color: #cccccc;"> tk.Tk()</span></div><div><span style="color: #cccccc;">root.title(</span><span style="color: #ce9178;">"Web Browser"</span><span style="color: #cccccc;">)</span></div><br /><div><span style="color: #cccccc;">label </span><span style="color: #d4d4d4;">=</span><span style="color: #cccccc;"> tk.Label(root, </span><span style="color: #9cdcfe;">text</span><span style="color: #d4d4d4;">=</span><span style="color: #ce9178;">"Enter URL"</span><span style="color: #cccccc;">)</span></div><div><span style="color: #cccccc;">label.pack()</span></div><br /><div><span style="color: #cccccc;">entry </span><span style="color: #d4d4d4;">=</span><span style="color: #cccccc;"> tk.Entry(root)</span></div><div><span style="color: #cccccc;">entry.pack()</span></div><br /><div><span style="color: #cccccc;">button </span><span style="color: #d4d4d4;">=</span><span style="color: #cccccc;"> tk.Button(root, </span><span style="color: #9cdcfe;">text</span><span style="color: #d4d4d4;">=</span><span style="color: #ce9178;">"Go"</span><span style="color: #cccccc;">, </span><span style="color: #9cdcfe;">command</span><span style="color: #d4d4d4;">=</span><span style="color: #cccccc;">open_url)</span></div><div><span style="color: #cccccc;">button.pack()</span></div><br /><div><span style="color: #cccccc;">root.mainloop()</span></div><br /><br /></div>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-76914895248016946212023-09-22T05:34:00.009-07:002023-09-22T05:36:51.811-07:00Roles and Responsibilities of a Data Analyst in 2023<div style="text-align: justify;"><b>CursorAI Prompt: # Roles and Responsibilities of a Data Analyst in 2023</b></div><p style="text-align: left;">1. **<b>Data Collection and Processing</b>**: A data analyst is responsible for collecting, processing, and performing statistical analyses of data. <br /><br />2. **<b>Data Cleaning**:</b> They are responsible for finding and correcting errors, or 'cleaning' the data, to make it suitable for data analysis.<br /><br />3. **<b>Data Interpretation</b>**: They interpret complex data sets to help companies make decisions. This involves presenting data in charts, graphs, tables, designing and creating data reports using statistical software.<br /><br />4. **<b>Predictive Analysis</b>**: With the rise of machine learning and AI, data analysts are expected to use predictive models to interpret trends and patterns in data.<br /><br />5. **<b>Data Security</b>**: Ensuring the integrity and security of data is a key responsibility. This includes setting up correct access permissions and also regularly backing up data to prevent data loss.<br /><br />6. **<b>Communication</b>**: Data analysts are expected to communicate their findings, or translate the data into an understandable document. They will need to present their findings to both technical and non-technical team members.<br /><br />7. **<b>Staying Up-to-Date</b>**: As the field of data analysis is constantly evolving, a data analyst in 2023 is expected to stay up-to-date with the latest industry trends and advancements in technology.<br /></p>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-79641797911721212392023-09-22T05:31:00.004-07:002023-09-22T05:31:47.173-07:00Cursor AI Prompt for DNS configuration<div style="text-align: left;"><b>Cursor AI Prompt for DNS configuration</b><br /></div><div style="text-align: left;"><b>Prompt:</b> Share the DNS server configuration steps in Centos7.</div><div style="text-align: left;"><br /></div><div style="text-align: left;"> # Step 1: Install the bind package<br /> sudo yum install bind bind-utils -y<br /><br /> # Step 2: Configure the main configuration file named.conf<br /> sudo vi /etc/named.conf<br /><br /> # Step 3: Add DNS zones to the named.conf file<br /> # Replace 'yourdomain.com' with your actual domain<br /> zone "yourdomain.com" IN {<br /> type master;<br /> file "forward.yourdomain";<br /> allow-update { none; };<br /> };<br /><br /> zone "0.0.10.in-addr.arpa" IN {<br /> type master;<br /> file "reverse.yourdomain";<br /> allow-update { none; };<br /> };<br /><br /> # Step 4: Create forward and reverse zone files<br /> sudo vi /var/named/forward.yourdomain<br /> sudo vi /var/named/reverse.yourdomain<br /><br /> # Step 5: Add DNS records to the zone files<br /> # In the forward zone file<br /> yourdomain.com. IN SOA ns.yourdomain.com. root.yourdomain.com. (<br /> 2011071001 ;Serial<br /> 3600 ;Refresh<br /> 1800 ;Retry<br /> 604800 ;Expire<br /> 86400 ;Minimum TTL<br /> )<br /><br /> # In the reverse zone file<br /> @ IN SOA ns.yourdomain.com. root.yourdomain.com. (<br /> 2011071001 ;Serial<br /> 3600 ;Refresh<br /> 1800 ;Retry<br /> 604800 ;Expire<br /> 86400 ;Minimum TTL<br /> )<br /><br /> # Step 6: Check the configuration files for syntax errors<br /> sudo named-checkconf<br /> sudo named-checkzone yourdomain.com /var/named/forward.yourdomain<br /> sudo named-checkzone yourdomain.com /var/named/reverse.yourdomain<br /><br /> # Step 7: Start and enable the named service<br /> sudo systemctl start named<br /> sudo systemctl enable named<br /><br /> # Step 8: Open DNS service in the firewall<br /> sudo firewall-cmd --permanent --add-service=dns<br /> sudo firewall-cmd --reload<br /></div>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-9174516289465379412023-08-16T07:42:00.001-07:002023-08-16T07:42:10.723-07:00Brave Brower installation in Ubuntu 23.04<p> To install Brave browser on Ubuntu 23.04, you can follow these steps:<br /><br />1. Open the terminal.<br />2. Install the `curl` command line download tool by running the following command:<br /> <br /><i>sudo apt install curl</i><br /> <br />3. Download and install the GPG key by running the following command:<br /> </p><p><i>sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg</i><br /> <br />4. Add the Brave apt source repository by running the following command:<br /> <br /><i>echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" | sudo tee /etc/apt/sources.list.d/brave-browser-release.list<br /></i> <br />5. Update the package cache by running the following command:<br /> <br /><i>sudo apt update</i><br /> <br />6. Install Brave browser by running the following command:<br /> <br /><i>sudo apt install brave-browser</i><br /> <br />7. Once the installation is complete, you can launch Brave browser from the system menu.<br /></p>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-77514190788432301182023-07-27T06:03:00.005-07:002023-07-27T06:03:41.068-07:00KVM installation in Ubuntu with these below commands<p><b>KVM installation in Ubuntu with these below commands</b><br /></p><p>sudo apt install -y cpu-checker<br />sudo apt install -y qemu-kvm virt-manager libvirt-daemon-system virtinst libvirt-clients bridge-utils<br />apt install qemu-system <br /></p>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-65199441257348353152023-07-12T07:00:00.004-07:002023-07-12T07:00:56.146-07:00Ansible syntax check with Python Module<p>The below commands will help us to check the ansible format.<br /></p><p>#pip install ansible-lint<br />#ansible-lint playbook.yml --force-color<br /> </p><p>#ansible-playbook playbook.yml --syntax-check<br /></p>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-29494996931819942312023-07-12T06:57:00.001-07:002023-07-12T06:57:38.495-07:00Fixation of older CentOS8 repos<p><b>Follow the below steps to fix the broken Centos8 repo setup</b><code> - works good in CentOS8<br /></code></p><p><code>sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*<br />sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*<br /></code></p>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-45428226949629287232023-07-12T06:50:00.003-07:002023-07-12T06:51:12.744-07:00Python overview<p><span face="Times New Roman, sans-serif"><span style="font-size: medium;"><b>Using
Python on your own</b></span></span>
</p><p class="western" style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">The
best way to learn any programming language is to practice it on your
own as much as you can. If you have Python installed on your
computer, you can execute the interpreter by running the python3
command (or just python on Windows), and you can close it by typing
exit() or Ctrl-D.</span></span></p>
<p class="western" style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">If
you don’t already have Python installed on your machine, that’s
alright. We’ll explain how to install it in an upcoming course.</span></span></p>
<p class="western" style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">In
the meantime, you can still practice by using one of the many online
Python interpreters or codepads available online. There’s not much
difference between an interpreter and a codepad. An interpreter is
more interactive than a codepad, but they both let you execute code
and see the results.</span></span></p>
<p class="western" style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">Below,
you’ll find links to some of the most popular online interpreters
and codepads. Give them a go to find your favorite.</span></span></p>
<ul><li><p class="western" style="line-height: 100%; margin-bottom: 0in; margin-top: 0.19in;">
<a href="https://www.python.org/shell/" target="_blank"><span style="color: blue;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><u>https://www.python.org/shell/</u></span></span></span></a></p>
</li><li><p class="western" style="line-height: 100%; margin-bottom: 0in;">
<a href="https://www.onlinegdb.com/online_python_interpreter" target="_blank"><span style="color: blue;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><u>https://www.onlinegdb.com/online_python_interpreter</u></span></span></span></a></p>
</li><li><p class="western" style="line-height: 100%; margin-bottom: 0in;">
<a href="https://repl.it/languages/python3" target="_blank"><span style="color: blue;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><u>https://repl.it/languages/python3</u></span></span></span></a></p>
</li><li><p class="western" style="line-height: 100%; margin-bottom: 0in;">
<a href="https://www.tutorialspoint.com/execute_python3_online.php" target="_blank"><span style="color: blue;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><u>https://www.tutorialspoint.com/execute_python3_online.php</u></span></span></span></a></p>
</li><li><p class="western" style="line-height: 100%; margin-bottom: 0in;">
<a href="https://rextester.com/l/python3_online_compiler" target="_blank"><span style="color: blue;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><u>https://rextester.com/l/python3_online_compiler</u></span></span></span></a></p>
</li><li><p class="western" style="line-height: 100%; margin-bottom: 0.19in;">
<a href="https://trinket.io/python3" target="_blank"><span style="color: blue;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><u>https://trinket.io/python3</u></span></span></span></a></p>
</li></ul>
<p class="western" style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span face="Times New Roman, sans-serif"><span style="font-size: medium;"><b>Additional
Python resources</b></span></span></p>
<p class="western" style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">While
this course will give you information about how Python works and how
to write scripts in Python, you’ll likely want to find out more
about specific parts of the language. Here are some great ways to
help you find additional info: </span></span></p>
<ul><li><p class="western" style="line-height: 100%; margin-bottom: 0in; margin-top: 0.19in;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">Read
the </span></span><a href="https://docs.python.org/3/" target="_blank"><span style="color: blue;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><u>official
Python documentation</u></span></span></span></a><span face="Times New Roman, sans-serif"><span style="font-size: small;">.</span></span></p>
</li><li><p class="western" style="line-height: 100%; margin-bottom: 0in;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">Search
for answers or ask a question on </span></span><a href="https://stackoverflow.com/" target="_blank"><span style="color: blue;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><u>Stack
Overflow</u></span></span></span></a><span face="Times New Roman, sans-serif"><span style="font-size: small;">. </span></span></p>
</li><li><p class="western" style="line-height: 100%; margin-bottom: 0in;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">Subscribe
to the Python </span></span><a href="https://mail.python.org/mailman/listinfo/tutor" target="_blank"><span style="color: blue;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><u>tutor</u></span></span></span></a><span face="Times New Roman, sans-serif"><span style="font-size: small;">
mailing list, where you can ask questions and collaborate with other
Python learners.</span></span></p>
</li><li><p class="western" style="line-height: 100%; margin-bottom: 0.19in;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">Subscribe
to the </span></span><a href="https://mail.python.org/mailman/listinfo/python-announce-list" target="_blank"><span style="color: blue;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><u>Python-announce</u></span></span></span></a><span face="Times New Roman, sans-serif"><span style="font-size: small;">
mailing list to read about the latest updates in the language.</span></span></p>
</li></ul>
<p class="western" style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span face="Times New Roman, sans-serif"><span style="font-size: medium;"><b>Python
history and current status</b></span></span></p>
<p class="western" style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">Python
was released almost 30 years ago and has a rich history. You can read
more about it on the </span></span><a href="https://en.wikipedia.org/wiki/History_of_Python" target="_blank"><span style="color: blue;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><u>History
of Python</u></span></span></span></a><span face="Times New Roman, sans-serif"><span style="font-size: small;">
Wikipedia page or in the section on the </span></span><a href="https://docs.python.org/3.0/license.html" target="_blank"><span style="color: blue;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><u>history
of the software</u></span></span></span></a><span face="Times New Roman, sans-serif"><span style="font-size: small;">
from the official Python documentation.</span></span></p>
<p class="western" style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">Python
has recently been called the fastest growing programming language. If
you're interested in why this is and how it’s measured, you can
find out more in these articles:</span></span></p>
<ul><li><p class="western" style="line-height: 100%; margin-bottom: 0in; margin-top: 0.19in;">
<a href="https://stackoverflow.blog/2017/09/06/incredible-growth-python/" target="_blank"><span style="color: blue;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><u>The
Incredible Growth of Python</u></span></span></span></a><span face="Times New Roman, sans-serif"><span style="font-size: small;">
(Stack Overflow)</span></span></p>
</li><li><p class="western" style="line-height: 100%; margin-bottom: 0in;">
<a href="https://www.netguru.com/blog/why-python-is-growing-so-quickly-future-trends" target="_blank"><span style="color: blue;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><u>Why
is Python Growing So Quickly - Future Trends</u></span></span></span></a><span face="Times New Roman, sans-serif"><span style="font-size: small;">
(Netguru)</span></span></p>
</li><li><p class="western" style="line-height: 100%; margin-bottom: 0in;">
<a href="https://opensource.com/article/18/5/numbers-python-community-trends" target="_blank"><span style="color: blue;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><u>By
the numbers: Python community trends in 2017/2018</u></span></span></span></a><span face="Times New Roman, sans-serif"><span style="font-size: small;">
(Opensource.com)</span></span></p>
</li><li><p class="western" style="line-height: 100%; margin-bottom: 0.19in;">
<a href="https://insights.stackoverflow.com/survey/2018#technology" target="_blank"><span style="color: blue;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><u>Developer
Survey Results 2018</u></span></span></span></a><span face="Times New Roman, sans-serif"><span style="font-size: small;">
(Stack Overflow)</span></span></p>
</li></ul>
<p class="western" style="line-height: 108%; margin-bottom: 0.11in;">For
loop</p>
<p class="western" style="line-height: 108%; margin-bottom: 0.11in;">for
i in range(10):</p>
<p class="western" style="line-height: 108%; margin-bottom: 0.11in;">
print(i)</p>
<h3 class="western">Functions and Keywords</h3>
<p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">Functions
and keywords are the building blocks of a language’s syntax.</span></span></p>
<p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">Functions
are pieces of code that perform a unit of work. In the examples we've
seen so far, we've only encountered the print() function, which
prints a message to the screen. We'll learn about a lot of other
functions in later lessons but, if you're too curious to wait until
then, you can discover all the functions available <span style="color: blue;"><u><a href="https://docs.python.org/3/library/functions.html" target="_blank">here</a></u></span>.</span></span></p>
<p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">Keywords
are reserved words that are used to construct instructions. We
briefly encountered for and in in our first Python example, and we'll
use a bunch of other keywords as we go through the course. For
reference, these are all the reserved keywords:</span></span></p>
<table cellpadding="1" cellspacing="0" style="width: 250px;">
<colgroup><col width="39"></col>
<col width="57"></col>
<col width="45"></col>
<col width="57"></col>
<col width="41"></col>
</colgroup><tbody><tr>
<td style="border: medium none; padding: 0in;" width="39"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">False</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="57"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">class</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="45"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">finally</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="57"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">is</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="41"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">return</span></span></p>
</td>
</tr>
<tr>
<td style="border: medium none; padding: 0in;" width="39"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">None</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="57"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">continue</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="45"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">for</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="57"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">lambda</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="41"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">try</span></span></p>
</td>
</tr>
<tr>
<td style="border: medium none; padding: 0in;" width="39"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">True</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="57"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">def</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="45"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">from</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="57"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">nonlocal</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="41"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">while</span></span></p>
</td>
</tr>
<tr>
<td style="border: medium none; padding: 0in;" width="39"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">and</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="57"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">del</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="45"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">global</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="57"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">not</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="41"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">with</span></span></p>
</td>
</tr>
<tr>
<td style="border: medium none; padding: 0in;" width="39"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">as</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="57"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">elif</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="45"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">if</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="57"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">or</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="41"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">yield</span></span></p>
</td>
</tr>
<tr>
<td style="border: medium none; padding: 0in;" width="39"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">assert</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="57"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">else</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="45"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">import</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="57"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">pass</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="41"><p class="western" style="orphans: 0; widows: 0;">
<br />
</p>
</td>
</tr>
<tr>
<td style="border: medium none; padding: 0in;" width="39"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">break</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="57"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">except</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="45"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">in</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="57"><p style="orphans: 0; widows: 0;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">raise</span></span></p>
</td>
<td style="border: medium none; padding: 0in;" width="41"><p class="western" style="orphans: 0; widows: 0;">
<br />
</p>
</td>
</tr>
</tbody></table>
<p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">You
don't need to learn this list; we'll dive into each keyword as we
encounter them. In the meantime, you can see examples of keyword
usage <span style="color: blue;"><u><a href="https://www.programiz.com/python-programming/keyword-list" target="_blank">here</a></u></span>.</span></span></p>
<h3 class="western">Arithmetic operators</h3>
<p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;">Python
can operate with numbers using the usual mathematical operators, and
some special operators, too. These are all of them (we'll explore the
last two in later videos).</span></span></p>
<ul><li><p style="line-height: 100%; margin-bottom: 0in; margin-top: 0.19in;">
<span face="Times New Roman, sans-serif"><span style="font-size: small;"><b>a
+ b </b>= Adds a and b</span></span></p>
</li><li><p style="line-height: 100%; margin-bottom: 0in;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><b>a
- b</b> = Subtracts b from a</span></span></p>
</li><li><p style="line-height: 100%; margin-bottom: 0in;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><b>a
* b</b> = Multiplies a and b</span></span></p>
</li><li><p style="line-height: 100%; margin-bottom: 0in;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><b>a
/ b</b> = Divides a by b</span></span></p>
</li><li><p style="line-height: 100%; margin-bottom: 0in;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><b>a
** b</b> = Elevates a to the power of b. For non integer values of
b, this becomes a root (i.e. a**(1/2) is the square root of a)</span></span></p>
</li><li><p style="line-height: 100%; margin-bottom: 0in;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><b>a
// b</b> = The integer part of the integer division of a by b</span></span></p>
</li><li><p style="line-height: 100%; margin-bottom: 0.19in;"><span face="Times New Roman, sans-serif"><span style="font-size: small;"><b>a
% b</b> = The remainder part of the integer division of a by b</span></span></p>
</li></ul>
<p class="western" style="line-height: 108%; margin-bottom: 0.11in;">def
greeting(name):</p>
<p class="western" style="line-height: 108%; margin-bottom: 0.11in;"> print("welcome,
" + name)</p>
<p class="western" style="line-height: 108%; margin-bottom: 0.11in;"><br />
<br />
</p>
<p class="western" style="line-height: 108%; margin-bottom: 0.11in;"><br />
<br />
</p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: green;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"># 1) Complete the function to return the result of the conversion</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: blue;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">def</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"> convert_distance(miles):</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: black;"> <span face="Consolas, sans-serif"><span style="font-size: x-small;">km = miles * </span></span></span><span style="color: #098658;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">1.6</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"> </span></span></span><span style="color: green;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"># approximately 1.6 km in 1 mile</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: black;"> </span><span style="color: blue;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">return</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"> km</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">my_trip_miles = </span></span></span><span style="color: #098658;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">55</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<br />
</p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: green;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"># 2) Convert my_trip_miles to kilometers by calling the function above</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">my_trip_km = convert_distance(my_trip_miles)</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<br />
</p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: green;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"># 3) Fill in the blank to print the result of the conversion</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: blue;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">print</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">(</span></span></span><span style="color: #a31515;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">"The distance in kilometers is "</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"> + </span></span></span><span style="color: blue;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">str</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">(my_trip_km))</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<br />
</p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: green;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"># 4) Calculate the round-trip in kilometers by doubling the result,</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: green;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"># and fill in the blank to print the result</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: blue;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">print</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">(</span></span></span><span style="color: #a31515;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">"The round-trip in kilometers is "</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"> + </span></span></span><span style="color: blue;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">str</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">(</span></span></span><span style="color: blue;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">round</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">(my_trip_km)))</span></span></span></p>
<p class="western" style="line-height: 108%; margin-bottom: 0.11in;"><br />
<br />
</p>
<p class="western" style="line-height: 108%; margin-bottom: 0.11in;">----</p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: blue;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">def</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"> lucky_number(name):</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: black;"> <span face="Consolas, sans-serif"><span style="font-size: x-small;">number = </span></span></span><span style="color: blue;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">len</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">(name) * </span></span></span><span style="color: #098658;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">9</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: black;"> <span face="Consolas, sans-serif"><span style="font-size: x-small;">result = </span></span></span><span style="color: #a31515;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">"Hello "</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"> + name + </span></span></span><span style="color: #a31515;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">". Your lucky number is "</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"> + </span></span></span><span style="color: blue;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">str</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">(number)</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: black;"> </span><span style="color: blue;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">return</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"> result</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: black;"> </span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: blue;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">print</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">(lucky_number(</span></span></span><span style="color: #a31515;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">"Kay"</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">))</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: blue;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">print</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">(lucky_number(</span></span></span><span style="color: #a31515;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">"Cameron"</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">))</span></span></span></p>
<p class="western" style="line-height: 108%; margin-bottom: 0.11in;"><br />
<br />
</p>
<p class="western" style="line-height: 108%; margin-bottom: 0.11in;">-----</p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: green;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"># This function compares two numbers and returns them</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: green;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"># in increasing order.</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: blue;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">def</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"> order_numbers(number1, number2):</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: black;"> </span><span style="color: blue;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">if</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"> number2 > number1:</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: black;"> </span><span style="color: blue;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">return</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"> number1, number2</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: black;"> </span><span style="color: blue;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">else</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">:</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: black;"> </span><span style="color: blue;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">return</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"> number2, number1</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<br />
</p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: green;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"># 1) Fill in the blanks so the print statement displays the result</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: green;"><span face="Consolas, sans-serif"><span style="font-size: x-small;"># of the function call</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">bigger, smaller = order_numbers(</span></span></span><span style="color: #098658;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">100</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">, </span></span></span><span style="color: #098658;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">99</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">)</span></span></span></p>
<p class="western" style="background: rgb(255, 255, 254); line-height: 0.2in; margin-bottom: 0in;">
<span style="color: blue;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">print</span></span></span><span style="color: black;"><span face="Consolas, sans-serif"><span style="font-size: x-small;">(smaller, bigger)</span></span></span></p>
<p><style type="text/css">h3 { line-height: 100%; text-align: left; orphans: 2; widows: 2; margin-top: 0.19in; margin-bottom: 0.19in; direction: ltr; background: transparent }h3.western { font-family: "Times New Roman", sans-serif; font-size: 13pt; font-weight: bold }h3.cjk { font-family: "Times New Roman"; font-size: 13pt; so-language: en-IN; font-weight: bold }h3.ctl { font-family: "Times New Roman"; font-size: 13pt; font-weight: bold }p { line-height: 115%; text-align: left; orphans: 2; widows: 2; margin-bottom: 0.1in; direction: ltr; background: transparent }p.ctl { font-family: "Latha" }a:link { color: #0000ff; text-decoration: underline }</style></p>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-52650960546854345142023-04-20T08:03:00.007-07:002023-04-20T08:03:59.315-07:00Ubuntu 18.04 Older Notes.<p><b>uget</b><br />sudo apt-add-repository ppa:plushuang-tw/uget-stable<br />sudo apt-get update<br />sudo apt-get install uget aria2<br /><br /><b>vlc</b><br />$ sudo add-apt-repository ppa:videolan/master-daily<br /><br />deb http://ppa.launchpad.net/videolan/master-daily/ubuntu focal main <br />$ sudo apt update<br />$ sudo apt install vlc qtwayland5<br />$ sudo apt install libavcodec-extra<br /><br />sudo add-apt-repository ppa:umang/indicator-stickynotes<br />sudo apt-get update<br />sudo apt-get install indicator-stickynotes<br /><br /><br />Download it from here: https://sourceforge.net/projects/pinguy-os/files/ISO_Builder/pinguybuilder_18.4-1_all-alpha.deb/download<br /><br /><b>Once downloaded ‘CD’ to the folder where it is and run:</b><br /><br />sudo dpkg -i pinguybuilder_18.4-1_all-alpha.deb<br />sudo apt-get install -f<br /><br />add-apt-repository ppa:ubuntuhandbook1/audacity<br />apt update && sudo apt install audacity<br /><br />git clone http://github.com/lwfinger/rtlwifi_new.git -b extended<br />cd rtlwifi<br />make<br />sudo make install<br />reboot<br /><br />apt-get install ultracopier<br /><br />sudo systemctl hibernate<br /><br />This did not work for me. I try pm-hibernate which did not work for me either until I added missing package uswsusp<br /><br />sudo apt install uswsusp <br /><br />install libelf-dev, libelf-devel or elfutils-libelf-devel"<br /><br />apt install openshot<br /></p>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-46518624744941007852023-04-20T07:58:00.006-07:002023-04-20T07:58:32.103-07:00Things has to be done after installing Linux Lite 5.6<p><b>Remove Thunderbird</b><br />apt remove thunderbird<br /><br /><b>Remove libreoffice</b><br />sudo apt-get remove --purge libreoffice*<br />sudo apt-get clean<br />sudo apt-get autoremove<br /><br />Go to folder /home/<yourusername>/.local/share/applications and delete files Libreoffice-calc, Libreoffice-writer & Libreoffice-impress<br />Again go to the folder /etc/skel/.local/share/applications and delete files Libreoffice-calc, Libreoffice-writer & Libreoffice-impress<br /><br /><b>Install Deluge / Transmission</b><br />apt install deluge<br />apt install transmission<br /><br /><b>Install testdisk for file recovery software</b><br />apt install testdisk<br /><br /><b>#Balena-etcher download for usb-flashing (startup disk)</b><br />apt install usb-creator-gtk<br /><br /><b>Install playonlinux for MS office etc</b><br />apt install playonlinux and install MS office 2016 - 32 bit<br />search the opt pacakge from virtualbox.com for ubuntu and install it for VMs.<br /><br /><b>Install pip3</b><br />apt install python3-pip<br /><br /><b>Install audacity - an audio editor</b><br />apt install audacity<br /><br /><b>Install openshot - a video editor</b><br />apt install openshot<br /><br /><b>#install cubic</b><br />apt install cubic<br /><br /><b>#Remastersys (optional)</b><br />apt-get install remaster-iso<br /><br /><b>Install Xtreme Download Manager</b><br />https://itsfoss.com/xtreme-download-manager-install/<br /><br /><b>Install Libreoffice</b><br />Download the latest Libre office and extract go to DEBS directory and run the below command<br />dpkg -i *.deb<br /><br /><b>Install neofetch</b><br />apt install neofetch<br /><br /><b>Install mouse server</b><br />dpkg -i mouseserver<br /><br /><b>Remove orphan packages</b><br />sudo apt-get install deborphan<br />deborphan<br />orphaner<br /><br />wget https://go.skype.com/skypeforlinux-64.deb<br />apt install ./skypeforlinux-64.deb<br /><br />pdfsam for <b>pdf manipulations</b><br /><br /><b>Install brave browser</b><br />sudo apt install apt-transport-https curl<br />sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg<br />echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main"|sudo tee /etc/apt/sources.list.d/brave-browser-release.list<br />sudo apt update<br />sudo apt install brave-browser<br /><br /><b>screen recorder</b><br />apt install simplescreenrecorder<br /></p>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-78901564063978741312023-04-20T07:51:00.003-07:002023-04-20T07:51:31.312-07:00 Software Ubuntu Budgie 22.04.2 LTS<p><b>Remove Thunderbird</b><br />apt remove thunderbird<br /><br /><b>Remove libreoffice</b><br />sudo apt-get remove --purge libreoffice*<br />sudo apt-get clean<br />sudo apt-get autoremove<br /><br /><b>Libreoffice latest</b><br />Download latest package from Libreoffice, extract the deb packages<br />https://www.libreoffice.org/download/download-libreoffice/<br />dpkg -i *.deb<br /><br /><b>xdm Downloader setup</b><br />https://xtremedownloadmanager.com/#downloads<br /><br /><b>vlc player - install inside the snap</b><br />snap install vlc<br /><br /><b>Download the atom deb package from the portal</b><br />dpkg -i atom*.deb<br />apt install -f<br /><br /><b>Deluge Torrent</b><br />apt install deluge<br /><br /><b>playonlinux wine frontend Software</b><br />apt install playonlinux - Remove this from budgie, if it fails.<br />2013 Office installation test - Did not support office 2016 yet<br /><br /><b>Virtualbox</b><br />Download latest from<br />https://www.virtualbox.org/wiki/Linux_Downloads<br />apt install virtualbox<br />apt install -f<br /><br /><b>Audio editor</b><br />apt install audacity<br /><br /><b>Install testdisk for file recovery software</b><br />apt install testdisk<br /><br /><b>Install openshot video editor</b><br />add-apt-repository ppa:openshot.developers/ppa<br />apt update<br />apt install openshot-qt python3-openshot<br /><br /><b>Install pip3</b><br />apt install python3-pip<br /><br /><b>Remove orphan packages</b><br />sudo apt-get install deborphan<br />deborphan<br /><br /><b>Install neofetch</b><br />apt install neofetch<br /><br /><b>Install mouse server</b><br />dpkg -i mouseserver<br /><br /><b>screen recorder with voice</b><br />apt install obs-studio<br /><br /><b>pdf manipulations</b><br />https://download.qoppa.com/pdfstudio/PDFStudio_linux64.sh<br />chmod +x PDFStudio_linux64.sh<br />./PDFStudio_linux64.sh<br />PDF Sam<br />https://github.com/torakiki/pdfsam/releases/download/v5.0.3/pdfsam-5.0.3-linux.tar.gz<br /></p>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-36096037085819507942023-04-20T07:33:00.002-07:002023-04-20T07:43:09.308-07:00Necessary steps after installing Ubuntu 20.04 LTS<p><b>Ubuntu 20.04 LTS soft</b><br /> </p><p>1.#apt install transmission <b># Transmission</b><br />2.https://subhra74.github.io/xdm/#downloads <b># Xtreme downloader</b><br />3.#apt install ultracopier <b>#Ultracopier</b><br />4.#apt install gnome-tweak-tool <b>#Gnome tweaks</b><br />5.#apt install gnome-chess <b>#Gnome-chess</b><br /><br />6.PlayonLinux<br />apt install wine64<br />apt install winetricks<br />apt install playonlinux<br /><br />WINEPREFIX=~/.wine/office2013 WINEARCH=win32 winecfg<br />cd /home/pna/.wine/<br />WINEPREFIX=~/.wine/office2013 WINEARCH=win32 winetricks<br />WINEPREFIX=~/.wine/office2013 WINEARCH=win32 winetricks msxml6<br />WINEPREFIX=~/.wine/office2013 WINEARCH=win32 wine filename.exe<br /><br /><br />7.KVM Refer https://linuxconfig.org/install-and-set-up-kvm-on-ubuntu-20-04-focal-fossa-linux<br />#apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virt-manager<br />#ip a <b>#note down the LAN interface</b><br />#vim /etc/network/interfaces<br />auto br0<br /><br />iface enp0s3 inet manual<br /><br />iface br0 inet dhcp<br /> bridge_ports enp0s3<br />:wq - save the file<br /><br />#adduser pna libvirt<br />#adduser pna libvirt-qemu<br /><br />8.#apt install audacity - Audacity<br />9.#apt install vim - vim<br /><br />10.Tor browser<br />#apt install torbrowser-launcher<br />#torbrowser-launcher<br /><br />11.Libre office (Download the latest package and run dpkg -i *.deb)<br /><br />12.VLC Refer: https://linuxconfig.org/ubuntu-20-04-vlc-installation<br />sudo apt install vlc<br />sudo apt install vlc-plugin-access-extra libbluray-bdj libdvdcss2<br />vlc<br /><br />13.Google Chrome<br />sudo apt install gdebi-core wget<br />wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb<br />sudo gdebi google-chrome-stable_current_amd64.deb<br />google-chrome<br /><br />14.#apt install terminator - <b>Terminator</b><br />15.mouse server <b># remote from phone</b><br />16.#apt install pinta <b># Image editor</b><br />17.#apt install kdenlive <b># Kdenlive - Videoeditor</b><br />18.#apt-get install lmms <b># Musicsoftware</b><br />19.#apt install testdisk <b>#Testdisk</b><br />20.#apt-get install ansible -y<br />21.#apt install usb-creator-gtk <b>#Ubuntu startup disk</b><br />22.#apt install devede <b>#Devede writer</b><br />23.#apt install brasero <b>#brasero<br /></b><br />24. Works only vob format<br />apt install pv<br />pv *.VOB > output.vob<br /><br />25.#apt install blender <b>#Blender-3d editor</b><br />26.#apt install gimp <b>#Gimp Image Editor</b><br /><br />27.#apt-get install ffmpeg<br />ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4<br /><br />28.#apt install pulseaudio-equalizer<br />apt install pavucontrol<br /><br />29.#apt install soundconverter<br />30.Putty configuration / Termius from Ubuntu Software<br /><br />31.#apt install docker.io<br />systemctl enable --now docker<br />usermod -aG docker pna<br />docker --version<br /><br />32.sudo apt install chrome-gnome-shell<br /><br />33.Cubic installation for remastersys ubuntu<br />sudo add-apt-repository ppa:cubic-wizard/release<br />sudo apt update<br />sudo apt install cubic<br /><br />apt install syslinux-utils<br />isohybrid /path/to/custom_iso.iso<br /><br />34.apt-get install plank #dock for ubuntu<br /><br />35.apt install squashfs-tools<br />http://www.linux-live.org/ - Download<br />#cd /tmp<br />#build<br /><br />8.Virtualbox / 9.VMware15 pro - CU7J2-4KG8J-489TY-X6XGX-MAUX2<br /><br />11.Openshot Videoeditor<br />sudo add-apt-repository ppa:openshot.developers/ppa<br />sudo apt update<br />sudo apt install openshot-qt<br /><br />15.screen recorder - Ctrl+Alt+Shift+R to start or stop recording.<br />screenshot<br />sudo apt-add-repository ppa:sylvain-pineau/kazam<br />sudo apt update<br />sudo apt install kazam<br />sudo apt upgrade<br /><br /><b>Enable hibernate</b><br /> pm-hibernate<br /><br /> $ sudo -i<br /> $ cd /var/lib/polkit-1/localauthority/50-local.d/<br /> $ gedit com.ubuntu.enable-hibernate.pkla<br /><br /> [Re-enable hibernate by default in upower]<br /> Identity=unix-user:*<br /> Action=org.freedesktop.upower.hibernate<br /> ResultActive=yes<br /> [Re-enable hibernate by default in logind]<br /> Identity=unix-user:*<br /> Action=org.freedesktop.login1.hibernate<br /> ResultActive=yes<br /><br />26.wget -O nero-64bit.deb http://drive.noobslab.com/data/apps/nero/nerolinux-4.0.0.0b-x86_64.deb<br />dpkg -i nerolinux<br />nero linux: 9M1K-0098-P3HL-PK6P-T6UA-1E5X-E557-8X41<br /><br />30. zip -re output_file.zip file1 folder1<br />31. rm /var/lib/dpkg/lock-frontend<br /><br />32. apt install cockpit<br />33. apt install nodejs<br />34. apt install screenfetch<br />35. apt install winbind cabextract (msxml6)<br />36. apt-get -y install python3-pip<br /></p>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-79577530797373129832023-04-04T09:29:00.001-07:002023-04-04T09:33:53.055-07:00How to Fix Error: Failed to Download Metadata for Repo ‘AppStream’ in CentOS 8.x<p>In CentOS8, you might have got the below error while updating the packages via yum/dnf.</p><p><span style="color: red;">"How to Fix Error: Failed to Download Metadata for Repo ‘AppStream’ in CentOS 8.x"</span></p><p><b>The below is the Cause of This Error:</b><br /></p><p>You may well be aware that CentOS Linux 8 died a premature death, it reached the End Of Life (EOL) on December 31st, 2021, thus it no longer receives development resources from the official CentOS project.<br /><br />This means that after Dec 31st, 2021, to update your CentOS installation, you are required to change the mirrors to CentOS Vault Mirror, where they will be archived permanently. <br /></p><p><b>Here is the fix:</b></p><p>Type the below commands one by one fix the above error. It works good.<br /></p><code><p>#sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*<br />#sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*<br />#dnf update<br /></p></code><p style="text-align: right;"><span style="font-size: xx-small;">This is referred from https://www.tecmint.com/error-failed-to-download-metadata-for-repo-appstream/</span></p>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-21785107665098555472022-07-22T08:07:00.003-07:002022-07-22T08:07:28.981-07:00RedHat 8 installation step by step with screenshots<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCggkNQ5IQZxkKPtYsYGr9aMKxV8pyG7OpZINyGX6BHMnSLrRXf4vx87Q3V1YqbUeRWwOlzM7Cl2ozcCO-4UbCu-1PUq3Ltf8ayQXVJD-ej5DwS5IUzNn9d83sbT1OTEOB-WQDRxAc7LT144R70OKS3LOva38DyrWBz32Ceup5d1HD7-k0ESwYonugzg/s1024/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1024" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCggkNQ5IQZxkKPtYsYGr9aMKxV8pyG7OpZINyGX6BHMnSLrRXf4vx87Q3V1YqbUeRWwOlzM7Cl2ozcCO-4UbCu-1PUq3Ltf8ayQXVJD-ej5DwS5IUzNn9d83sbT1OTEOB-WQDRxAc7LT144R70OKS3LOva38DyrWBz32Ceup5d1HD7-k0ESwYonugzg/s320/1.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS1ZJcTd2HqrpVnZitdoGhrtAO758iE9tkwGfPczzHRaymypUQrY5eToQZuTK3vlnprRAR90sOf3XF8rwem6XmZsdMFuX5fJAr8Qq8JuZeOHM6MhCuWntTL9luo-nJM3ENj5brzQKPszVxLV8VF4-nQsHzILg3g_JC9lAb3ooHP2xgs5qP62l66ms9QQ/s1024/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1024" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS1ZJcTd2HqrpVnZitdoGhrtAO758iE9tkwGfPczzHRaymypUQrY5eToQZuTK3vlnprRAR90sOf3XF8rwem6XmZsdMFuX5fJAr8Qq8JuZeOHM6MhCuWntTL9luo-nJM3ENj5brzQKPszVxLV8VF4-nQsHzILg3g_JC9lAb3ooHP2xgs5qP62l66ms9QQ/s320/2.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSckXDTi55gZRL0azZEUOc6JVMobyka3RhSIPoUstQrlmNxobrzQvrUYtRZOQWxUA4oDKzOTrb4eeRvyUmbRFzWhN-B5v3lR-W_AuhVC-tVq8MysiH9O5fCf0D_qj-i7ZKx4hgEOG0wEMjGE-5YkSm0FNliZnIUoua59r12Usp18S0fnpYeIG8E9s_RQ/s1024/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1024" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSckXDTi55gZRL0azZEUOc6JVMobyka3RhSIPoUstQrlmNxobrzQvrUYtRZOQWxUA4oDKzOTrb4eeRvyUmbRFzWhN-B5v3lR-W_AuhVC-tVq8MysiH9O5fCf0D_qj-i7ZKx4hgEOG0wEMjGE-5YkSm0FNliZnIUoua59r12Usp18S0fnpYeIG8E9s_RQ/s320/3.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHz9uWrukrHZU4Ck-_2dVSUvCyob7tWSoKPPsrI02qHT8OaSAq0trMVxLkrKk_MmE0o634eOELOYgb_3Gw2BzZULwVbZ2yZ20rGZ2MdcXPYmu491boKoeplXqGYSTmxQ70uYsREwO6AGCkRnW2exsG9NAem2qvDVJAbigM_itGhPyM7TyBUXmPJ79rEg/s1024/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1024" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHz9uWrukrHZU4Ck-_2dVSUvCyob7tWSoKPPsrI02qHT8OaSAq0trMVxLkrKk_MmE0o634eOELOYgb_3Gw2BzZULwVbZ2yZ20rGZ2MdcXPYmu491boKoeplXqGYSTmxQ70uYsREwO6AGCkRnW2exsG9NAem2qvDVJAbigM_itGhPyM7TyBUXmPJ79rEg/s320/4.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ-5LfaJPxO33fbNknhbGvhzIolr1Oz4BScowSGndb9a7keu7-G87N6z0-lcfVlZZG2oYls2e8DlATnyT6SrlTM88zehx-OcAJyfs7ZsNBKLkwcSugdgy_cM_ni4o3oMejrVdqmpLKcXzVgAKtXk83LXn7ZDNngmux9UTtKpXL4A0Pov1jL457vw6oDQ/s1024/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1024" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ-5LfaJPxO33fbNknhbGvhzIolr1Oz4BScowSGndb9a7keu7-G87N6z0-lcfVlZZG2oYls2e8DlATnyT6SrlTM88zehx-OcAJyfs7ZsNBKLkwcSugdgy_cM_ni4o3oMejrVdqmpLKcXzVgAKtXk83LXn7ZDNngmux9UTtKpXL4A0Pov1jL457vw6oDQ/s320/5.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhikBu7LcSTFTkOEqFEVYOswY_VDt_bGfag_lsLrbv9w4Z_LC50onG8r1Di0eC8b2Ue1Gtytns831R5vl-w1IAiFAdELQMLlONUXSYAX1VrkrltQeFYmAV36AXRAFW1UBBpuEGg22do81F9WlID7PmlimaaJkNvOlYFU-apZzFsi5b0jJ_VtGWIpRBCNQ/s1024/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1024" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhikBu7LcSTFTkOEqFEVYOswY_VDt_bGfag_lsLrbv9w4Z_LC50onG8r1Di0eC8b2Ue1Gtytns831R5vl-w1IAiFAdELQMLlONUXSYAX1VrkrltQeFYmAV36AXRAFW1UBBpuEGg22do81F9WlID7PmlimaaJkNvOlYFU-apZzFsi5b0jJ_VtGWIpRBCNQ/s320/6.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji2RNPlOywaT6YMAb95tWeeii4vDWDiu-lj5z2ypNZ9xOvVb30K1sjmg0xRp7ElY-ewar25RuRaBu-pR56g9hNkjbBzt62xqWF_LlYdSFkIfH81upPkdl14xgrTY_SpHy9wtXuuPXqGDcqsqipTUeMgcdy7RU603A2bpe0_5G8HaAiNMDaLJq6t5s98g/s1024/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1024" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji2RNPlOywaT6YMAb95tWeeii4vDWDiu-lj5z2ypNZ9xOvVb30K1sjmg0xRp7ElY-ewar25RuRaBu-pR56g9hNkjbBzt62xqWF_LlYdSFkIfH81upPkdl14xgrTY_SpHy9wtXuuPXqGDcqsqipTUeMgcdy7RU603A2bpe0_5G8HaAiNMDaLJq6t5s98g/s320/7.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAbE0QFCVj0Xd_uPeVIbT4dNlqe7uq_KwJkAMn3rhxS23GK7j60mDN8Lygs3Z5px9kZm-LeXgYy-ibJF-xwYNXVEKCbZuE2o8GqQPiHiC-2-H1MVDWEPVINj2f0GWcru0LPmH_nA0fGoKqEQPFPQ8OrgDAyskPfppoZkAlU_tlRKdVl_V3LqW_GCMGcQ/s1024/8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1024" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAbE0QFCVj0Xd_uPeVIbT4dNlqe7uq_KwJkAMn3rhxS23GK7j60mDN8Lygs3Z5px9kZm-LeXgYy-ibJF-xwYNXVEKCbZuE2o8GqQPiHiC-2-H1MVDWEPVINj2f0GWcru0LPmH_nA0fGoKqEQPFPQ8OrgDAyskPfppoZkAlU_tlRKdVl_V3LqW_GCMGcQ/s320/8.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrEK30lMDIp_Fue1OYpeAfBU8e1ns97ib3vpS92L47wAwnJdNzNePLUq17JmHRzoWYSujKLN4W9AfAbCG-DYOy4MUdU_t8GQI2P8HJeydpVi6knELuZhFsvL8Xz-A9LM9XgrvdUYJJswvp8g8MGJxi9XJZSjtcz-hIHnRovVfNvJ0Dlcy2M5OWT5XxWg/s1024/9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1024" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrEK30lMDIp_Fue1OYpeAfBU8e1ns97ib3vpS92L47wAwnJdNzNePLUq17JmHRzoWYSujKLN4W9AfAbCG-DYOy4MUdU_t8GQI2P8HJeydpVi6knELuZhFsvL8Xz-A9LM9XgrvdUYJJswvp8g8MGJxi9XJZSjtcz-hIHnRovVfNvJ0Dlcy2M5OWT5XxWg/s320/9.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvk74xBfS3WCikxS2CWbQxihdofHEvTFEMan20BMWAkdd4fgHuL4DZgLiSkJMWbUe06a1A0H_Q5fzkKmokLVFfrivKNaLxHx6FO5pkj7QVIojdKKjYibs_uaG9aWJ6A4BgzmcP8z3VaVGKMSWicV3w8KCnt7eVJDBpHRyhcT-gB-aCEFfxn6_UyoIupw/s1024/10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1024" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvk74xBfS3WCikxS2CWbQxihdofHEvTFEMan20BMWAkdd4fgHuL4DZgLiSkJMWbUe06a1A0H_Q5fzkKmokLVFfrivKNaLxHx6FO5pkj7QVIojdKKjYibs_uaG9aWJ6A4BgzmcP8z3VaVGKMSWicV3w8KCnt7eVJDBpHRyhcT-gB-aCEFfxn6_UyoIupw/s320/10.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3AT0_qFmhaP6k175yuZV9z5ExzFEeFiXIZLuw0I9vT04HfIe-p_eJwY-rjn3rjlWVa4TMFWD4d0ckfg2uTpWNtub2LyQ2ZBS5ZY9CP1EeFGWnb5FfJdGbTC2VkOLrlZZwR5JkrrFee0Sj-S_xuhyyH_pQR2BLjlSCnFxnzsSGw73v7Mlwn4vhhSbMpQ/s1024/12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1024" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3AT0_qFmhaP6k175yuZV9z5ExzFEeFiXIZLuw0I9vT04HfIe-p_eJwY-rjn3rjlWVa4TMFWD4d0ckfg2uTpWNtub2LyQ2ZBS5ZY9CP1EeFGWnb5FfJdGbTC2VkOLrlZZwR5JkrrFee0Sj-S_xuhyyH_pQR2BLjlSCnFxnzsSGw73v7Mlwn4vhhSbMpQ/s320/12.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCaBPYx57g0KUEOUGlw_z88wiDZyvCEn8PvF4CPIhmBQGC9G_wosChLYxtKzOglvbXDBwyWCRZ1mEl6WqI0bTX2iXTvmeW9O90T66vtZTmL_soPTffM33OKuUoCq8hYrCGsql-9pSIY3qOZUyfSVRHODFAXwYQAV-2jeGVSPoJVHCrWyrkY4vdp0YyVQ/s1024/13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1024" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCaBPYx57g0KUEOUGlw_z88wiDZyvCEn8PvF4CPIhmBQGC9G_wosChLYxtKzOglvbXDBwyWCRZ1mEl6WqI0bTX2iXTvmeW9O90T66vtZTmL_soPTffM33OKuUoCq8hYrCGsql-9pSIY3qOZUyfSVRHODFAXwYQAV-2jeGVSPoJVHCrWyrkY4vdp0YyVQ/s320/13.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTEi-VbVO9qAxRzyxuesd4Vm99i3Gu1kWOVSd7Lxj7s-DG7GVO1Tl99Uah0UbBdd3RT0pDnGVEFRbi-fQjkzfJvloaSKLMQHUpyEwBTrOorSVQrIodE1Sjy9-GZ6UO3-pwi6IG3N2hBqEjPNHUp0Dd8KbdhOKwRwhWRYLK2uWKK9GPGmEktIMexwQACw/s1024/14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1024" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTEi-VbVO9qAxRzyxuesd4Vm99i3Gu1kWOVSd7Lxj7s-DG7GVO1Tl99Uah0UbBdd3RT0pDnGVEFRbi-fQjkzfJvloaSKLMQHUpyEwBTrOorSVQrIodE1Sjy9-GZ6UO3-pwi6IG3N2hBqEjPNHUp0Dd8KbdhOKwRwhWRYLK2uWKK9GPGmEktIMexwQACw/s320/14.png" width="320" /></a></div><p></p>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-24794687142179684032022-07-21T08:47:00.005-07:002022-07-21T08:48:43.449-07:00Linux /etc/shadow file explanation <div style="text-align: justify;"></div><p style="text-align: left;"><img alt="A visual display of /etc/passwd and/etc/shadow — Stratosphere IPS" class="n3VNCb KAlRDb" data-noaft="1" src="https://images.squarespace-cdn.com/content/v1/5a01100f692ebe0459a1859f/1603347459833-GSR76P31T020NK97YV4B/BSY+Security+Class+Diagrams+-+_etc_shadow+%28L%29.jpg?format=1000w" style="height: 318.24px; margin: 0px; width: 585px;" /> <br /></p><p style="text-align: left;">1. Username : A valid account name, which exist on the system.<br /><br />2. Password : Your encrypted password is in hash format. The password should be minimum 15-20 characters long including special characters, digits, lower case alphabetic and more. Usually password format is set to $id$salt$hashed, The $id is the algorithm used On GNU/Linux as follows:<br /> $1$ is MD5<br /> $2a$ is Blowfish<br /> $2y$ is Blowfish<br /> $5$ is SHA-256<br /> $6$ is SHA-512<br /><br />3. Last password change (lastchanged) : The date of the last password change, expressed as the number of days since Jan 1, 1970 (Unix time). The value 0 has a special meaning, which is that the user should change her password the next time she will log in the system. An empty field means that password aging features are disabled.<br /><br />4. Minimum : The minimum number of days required between password changes i.e. the number of days left before the user is allowed to change her password again. An empty field and value 0 mean that there are no minimum password age.<br /><br />5. Maximum : The maximum number of days the password is valid, after that user is forced to change her password again.<br /><br />6. Warn : The number of days before password is to expire that user is warned that his/her password must be changed<br /><br />7. Inactive : The number of days after password expires that account is disabled.<br /><br />8. Expire : The date of expiration of the account, expressed as the number of days since Jan 1, 1970.</p>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-83447325281117146212022-07-20T09:13:00.000-07:002022-07-20T09:13:05.801-07:00Linux /etc/passwd file fields explation in detail<div style="text-align: justify;"></div><p style="text-align: left;"><img alt="Linux Privilege Escalation - Writable passwd file - StefLan's Security Blog" class="n3VNCb KAlRDb" data-noaft="1" src="https://i0.wp.com/steflan-security.com/wp-content/uploads/2021/01/image-308.png?resize=616%2C198&ssl=1" style="height: 188.036px; margin: 0px; width: 585px;" /> <br /></p><p style="text-align: left;">1. Username: It is used when user logs in. It should be between 1 and 32 characters in length.<br /></p><p style="text-align: left;">2. Password: An x character indicates that encrypted password is stored in /etc/shadow file. Please note that you need to use the passwd command to computes the hash of a password typed at the CLI or to store/update the hash of the password in /etc/shadow file.<br /></p><p style="text-align: left;">3. User ID (UID): Each user must be assigned a user ID (UID). UID 0 (zero) is reserved for root and UIDs 1-99 are reserved for other predefined accounts. Further UID 100-999 are reserved by system for administrative and system accounts/groups.<br /></p><p style="text-align: left;">4. Group ID (GID): The primary group ID (stored in /etc/group file)</p><p style="text-align: left;">5. User ID Info (GECOS): The comment field. It allow you to add extra information about the users such as user’s full name, phone number etc. This field use by finger command.</p><p style="text-align: left;">6. Home directory: The absolute path to the directory the user will be in when they log in. If this directory does not exists then users directory becomes <br /></p><p style="text-align: left;">7. Command/shell: The absolute path of a command or shell (/bin/bash). Typically, this is a shell. Please note that it does not have to be a shell. For example, sysadmin can use the nologin shell, which acts as a replacement shell for the user accounts. If shell set to /sbin/nologin and the user tries to log in to the Linux system directly, the /sbin/nologin shell closes the connection.<br /></p>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-55032716063179701342022-04-21T22:41:00.000-07:002022-04-21T22:41:02.420-07:00Debian 5 legacy password reset<p>Interact with the boot loader (Lilo / Grub)<br />Enter into single user mode - linux init=/bin/sh<br />mount -o remount,rw /<br />mount /usr<br />passwd</p>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-69699494780056543982022-04-21T22:18:00.003-07:002022-04-21T22:18:43.228-07:00Realtech RTL8188FTV wireless LAN adapter driver installation in Ubuntu 20.04<p>Realtech RTL8188FTV wireless LAN adapter driver works good in Ubuntu 20.04. Refer the below git link to set it up.</p><p><a href="https://github.com/kelebek333/rtl8188fu">https://github.com/kelebek333/rtl8188fu</a></p><p><a href="https://dev.to/darkdebo/how-to-use-the-wifi-in-ubuntu-20-04-using-realtek-semiconductor-802-11n-53c0">https://dev.to/darkdebo/how-to-use-the-wifi-in-ubuntu-20-04-using-realtek-semiconductor-802-11n-53c0</a><br /></p>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-18627214139092843322021-05-29T07:08:00.002-07:002021-05-29T07:09:36.389-07:00Upgrade Linux lite 5.2 to Linux lite 5.4<p>Follow the below steps to upgrade Linux lite 5.2 to Linux lite 5.4</p><p>#cat /etc/llver<br />#sudo apt-get install --reinstall lite-upgrade-series5<br />#apt policy lite-upgrade-series5</p><p>lite-upgrade-series5:<br /> Installed: 5.0-0030-linuxlite<br /> Candidate: 5.0-0030-linuxlite<br /> Version table:<br /> *** 5.0-0030-linuxlite 500<br /> 500 http://repo.linuxliteos.com/linuxlite emerald/main amd64 Packages<br /> 500 http://repo.linuxliteos.com/linuxlite emerald/main i386 Packages<br /> 100 /var/lib/dpkg/status<br /></p><p>or</p><p>Choose the menu option for Lite upgrade</p>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-479615814019400232021-05-17T09:06:00.004-07:002021-05-17T09:06:36.677-07:00Linux interview questions & answers - 2<p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;"><span style="font-size: small;"><span style="font-family: inherit;"><b>There
are seven fields in the /etc/passwd file. Which of the following
lists all the fields in the correct order?<br />
</b>Choose one:<br />
a.
username, UID, GID, home directory, command, comment<br />
b.
username, UID, GID, comment, home directory, command<br />
c. UID,
username, GID, home directory, comment, command<br />
d. username,
UID, group name, GID, home directory, comment<br />
<b>Answer: b<br />
</b><br />
The
seven fields required for each line in the /etc/passwd file are
username, UID, GID, comment, home directory, command. Each of these
fields must be separated by a colon even if they are empty.<br />
<br />
<b>Which
of the following commands will show a list of the files in your home
directory including hidden files and the contents of all
subdirectories?<br />
Choose one:<br />
</b>a. ls -c home<br />
b. ls
-aR /home/username<br />
c. ls -aF /home/username<br />
d. ls -l
/home/username<br />
<b>Answer: b<br />
</b><br />
The ls command is
used to display a listing of files. The -a option will cause hidden
files to be displayed as well. The -R option causes ls to recurse
down the directory tree. All of this starts at your home
directory.<br />
In order to prevent a user from logging in, you can
add a(n) ________at the beginning of the password field.<br />
<b>Answer:
asterick</b><br />
<br />
If you add an asterick at the beginning of
the password field in the /etc/passwd file, that user will not be
able to log in.<br />
<b>You have a directory called /home/ben/memos
and want to move it to /home/bob/memos so you issue the command mv
/home/ben/memos /home/bob. What is the results of this action?<br />
</b>Choose
one:<br />
a. The files contained in /home/ben/memos are moved to the
directory /home/bob/memos/memos.<br />
b. The files contained in
/home/ben/memos are moved to the directory /home/bob/memos.<br />
c.
The files contained in /home/ben/memos are moved to the directory
/home/bob/.<br />
d. The command fails since a directory called memos
already exists in the target directory.<br />
<b>Answer: a<br />
</b><br />
When
using the mv command to move a directory, if a directory of the same
name exists then a subdirectory is created for the files to be
moved.<br />
<b>Which of the following tasks is not necessary when
creating a new user by editing the /etc/passwd file?<br />
Choose
one:<br />
</b>a. Create a link from the user's home directory to the
shell the user will use.<br />
b. Create the user's home directory<br />
c.
Use the passwd command to assign a password to the account.<br />
d.
Add the user to the specified group.<br />
<b>Answer: a</b><br />
<br />
There
is no need to link the user's home directory to the shell command.
Rather, the specified shell must be present on your system.<br />
<b>You
issue the following command useradd -m bobm But the user cannot
logon. What is the problem?<br />
Choose one:<br />
</b>a. You need to
assign a password to bobm's account using the passwd command.<br />
b.
You need to create bobm's home directory and set the appropriate
permissions.<br />
c. You need to edit the /etc/passwd file and assign
a shell for bobm's account.<br />
d. The username must be at least
five characters long.<br />
<b>Answer: a<br />
</b><br />
The useradd
command does not assign a password to newly created accounts. You
will still need to use the passwd command to assign a password.<br />
<b>You
wish to print the file vacations with 60 lines to a page. Which of
the following commands will accomplish this? Choose one:<br />
</b>a.
pr -l60 vacations | lpr<br />
b. pr -f vacations | lpr<br />
c. pr -m
vacations | lpr<br />
d. pr -l vacations | lpr<br />
<b>Answer: a<br />
</b><br />
The
default page length when using pr is 66 lines. The -l option is used
to specify a different length.<br />
<b>Which file defines all users
on your system?<br />
Choose one:<br />
</b>a. /etc/passwd<br />
b.
/etc/users<br />
c. /etc/password<br />
d. /etc/user.conf<br />
<b>Answer:
a<br />
</b><br />
The /etc/passwd file contains all the information on
users who may log into your system. If a user account is not
contained in this file, then the user cannot log in.<br />
<b>Which
two commands can you use to delete directories?<br />
</b>A) rm<br />
B)
rm -rf<br />
C) rmdir<br />
D) rd<br />
E) rd -rf<br />
<br />
<b>Answer(s):
</b>B, C - You can use rmdir or rm -rf to delete a directory. Answer
a is incorrect, because the rm command without any specific flags
will not delete a directory, it will only delete files. Answers d and
e point to a non-existent command.</span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><br />
<b>Which
partitioning tool is available in all distributions?<br />
</b>A) Disk
Druid<br />
B) fdisk<br />
C) Partition Magic<br />
D) FAT32<br />
E)
System Commander<br />
<br />
<b>Answer(s)</b>: B - The fdisk
partitioning tool is available in all Linux distributions. Answers a,
c, and e all handle partitioning, but do not come with all
distributions. Disk Druid is made by Red Hat and used in its
distribution along with some derivatives. Partition Magic and System
Commander are tools made by third-party companies. Answer d is not a
tool, but a file system type. Specifically, FAT32 is the file system
type used in Windows 98.</span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><br />
<b>Which
partitions might you create on the mail server's hard drive(s) other
than the root, swap, and boot partitions?<br />
[Choose all correct
answers]<br />
</b>A) /var/spool<br />
B) /tmp<br />
C) /proc<br />
D)
/bin<br />
E) /home<br />
<br />
<b>Answer(s): </b>A, B, E - Separating
/var/spool onto its own partition helps to ensure that if something
goes wrong with the mail server or spool, the output cannot overrun
the file system. Putting /tmp on its own partition prevents either
software or user items in the /tmp directory from overrunning the
file system. Placing /home off on its own is mostly useful for system
re-installs or upgrades, allowing you to not have to wipe the /home
hierarchy along with other areas. Answers c and d are not possible,
as the /proc portion of the file system is virtual-held in RAM-not
placed on the hard drives, and the /bin hierarchy is necessary for
basic system functionality and, therefore, not one that you can place
on a different partition.<br />
When planning your backup strategy you
need to consider how often you will perform a backup, how much time
the backup takes and what media you will use.</span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;"><span style="font-size: small;"><span style="font-family: inherit;">
<b>What
other factor must you consider when planning your backup strategy?
_________<br />
</b><br />
<b>what to backup</b><br />
Choosing which
files to backup is the first step in planning your backup
strategy.<br />
What utility can you use to automate rotation of
logs?<br />
Answer: logrotate<br />
The logrotate command can be used
to automate the rotation of various logs.<br />
In order to display
the last five commands you have entered using the history command,
you would type ___________ .<br />
<b>Answer: history 5<br />
</b><br />
The
history command displays the commands you have previously entered. By
passing it an argument of 5, only the last five commands will be
displayed.</span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><br />
<b>What
command can you use to review boot messages?<br />
Answer: dmesg</b><br />
The
dmesg command displays the system messages contained in the kernel
ring buffer. By using this command immediately after booting your
computer, you will see the boot messages.</span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><br />
<b>What
is the minimum number of partitions you need to install
Linux?<br />
Answer: 2<br />
</b>Linux can be installed on two
partitions, one as / which will contain all files and a swap
partition.</span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><br />
<b>What
is the name and path of the main system log?<br />
Answer:
/var/log/messages<br />
<br />
By default, the main system log is
/var/log/messages.<br />
Of the following technologies, which is
considered a client-side script?<br />
</b>A) JavaScript<br />
B)
Java<br />
C) ASP<br />
D) C++<br />
<br />
<b>Answer:</b> A - JavaScript
is the only client-side script listed. Java and C++ are complete
programming languages. Active Server Pages are parsed on the server
with the results being sent to the client in HTML</span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><br />
<b>What
key combination can you press to suspend a running job and place it
in the background?<br />
</b>ctrl-z<br />
<br />
Using ctrl-z will
suspend a job and put it in the background.<br />
<b>The easiest, most
basic form of backing up a file is to _____ it to another
location.<br />
</b>copy<br />
<br />
The easiest most basic form of
backing up a file is to make a copy of that file to another location
such as a floppy disk.<br />
<b>What type of server is used to
remotely assign IP addresses to machines during the installation
process?<br />
</b>A) SMB<br />
B) NFS<br />
C) DHCP<br />
D) FT<br />
E)
HTTP<br />
<br />
C - You can use a DHCP server to assign IP addresses
to individual machines during the installation process. Answers a, b,
d, and e list legitimate Linux servers, but these servers do not
provide IP addresses. The SMB, or Samba, tool is used for file and
print sharing across multi-OS networks. An NFS server is for file
sharing across Linux net-works. FTP is a file storage server that
allows people to browse and retrieve information by logging in to it,
and HTTP is for the Web.</span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><br />
<b>Which
password package should you install to ensure that the central
password file couldn't be stolen easily?<br />
</b>A) PAM<br />
B)
tcp_wrappers<br />
C) shadow<br />
D) securepass<br />
E) ssh<br />
<br />
C
- The shadow password package moves the central password file to a
more secure location. Answers a, b, and e all point to valid
packages, but none of these places the password file in a more secure
location. Answer d points to an invalid package.</span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><br />
<b>When
using useradd to create a new user account, which of the following
tasks is not done automatically.<br />
</b>Choose one:<br />
a. Assign
a UID.<br />
b. Assign a default shell.<br />
c. Create the user's home
directory.<br />
d. Define the user's home directory.<br />
<br />
c<br />
<br />
The
useradd command will use the system default for the user's home
directory. The home directory is not created, however, unless you use
the -m option.</span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><br />
<b>You
want to enter a series of commands from the command-line. What would
be the quickest way to do this?<br />
Choose One<br />
</b>a. Press
enter after entering each command and its arguments<br />
b. Put them
in a script and execute the script<br />
c. Separate each command with
a semi-colon (;) and press enter after the last command<br />
d.
Separate each command with a / and press enter after the last
command<br />
<br />
c<br />
<br />
The semi-colon may be used to tell
the shell that you are entering multiple commands that should be
executed serially. If these were commands that you would frequently
want to run, then a script might be more efficient. However, to run
these commands only once, enter the commands directly at the command
line.</span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><br />
<b>You
attempt to use shadow passwords but are unsuccessful. What
characteristic of the /etc/passwd file may cause this?<br />
</b>Choose
one:<br />
a. The login command is missing.<br />
b. The username is
too long.<br />
c. The password field is blank.<br />
d. The password
field is prefaced by an asterisk.<br />
<br />
c<br />
<br />
The
password field must not be blank before converting to shadow
passwords.</span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><br />
<b>When
you install a new application, documentation on that application is
also usually installed. Where would you look for the documentation
after installing an application called MyApp?<br />
</b>Choose one:<br />
a.
/usr/MyApp<br />
b. /lib/doc/MyApp<br />
c. /usr/doc/MyApp<br />
d. In
the same directory where the application is installed.<br />
<br />
c<br />
<br />
The
default location for application documentation is in a directory
named for the application in the /usr/doc directory.</span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><br />
<b>What
file would you edit in your home directory to change which window
manager you want to use?<br />
</b>A) Xinit<br />
B) .xinitrc<br />
C)
XF86Setup<br />
D) xstart<br />
E) xf86init<br />
<br />
<b>Answer: </b>B
- The ~/.xinitrc file allows you to set which window man-ager you
want to use when logging in to X from that account.<br />
Answers a,
d, and e are all invalid files. Answer c is the main X server
configuration file.</span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p align="center" style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;"><span style="font-size: small;"><span style="font-family: inherit;">
</span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>What
command allows you to set a processor-intensive job to use less </b></span><span style="color: black;"><b>CPU
time</b></span><span style="color: black;"><b>?</b></span><span style="color: black;"><b><br />
</b></span><span style="color: black;">A)
ps<br />
B) nice<br />
C) chps<br />
D) less<br />
E) more<br />
<br />
</span><span style="color: black;"><b>Answer:
B -</b></span><span style="color: black;">
The nice command is used to change a job's priority level, so that it
runs slower or faster. Answers a, d, and e are valid commands but are
not used to change process information. Answer c is an invalid
command.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>While
logged on as a regular user, your boss calls up and wants you to
create a new user account immediately. How can you do this without
first having to close your work, log off and logon as root?</b></span><span style="color: black;"><br />
Choose
one:<br />
a. Issue the command rootlog.<br />
b. Issue the command su
and type exit when finished.<br />
c. Issue the command su and type
logoff when finished.<br />
d. Issue the command logon root and type
exit when finished.<br />
<br />
</span><span style="color: black;"><b>Answer:
b<br />
</b></span><span style="color: black;">You
can use the su command to imitate any user including root. You will
be prompted for the password for the root account. Once you have
provided it you are logged in as root and can do any administrative
duties.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;"><span style="font-size: small;"><span style="font-family: inherit;">
</span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;">In
order o run fsck on the root partition, the root partition must be
mounted as</span><span style="color: black;">
</span><span style="color: black;">readonly<br />
You
cannot run fsck on a partition that is mounted as read-write.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>In
order to improve your </b></span><span style="color: black;"><b>system's
security</b></span><span style="color: black;"><b>
you decide to implement shadow passwords. What command should you
use?<br />
</b></span><span style="color: black;">pwconv<br />
<br />
The
pwconv command creates the file /etc/shadow and changes all passwords
to 'x' in the /etc/passwd file.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>Bob
Armstrong, who has a username of boba, calls to tell you he forgot
his password. What command should you use to reset his
command?<br />
</b></span><span style="color: black;">passwd
boba<br />
<br />
The passwd command is used to change your password.
If you do not specify a username, your password will be changed.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>The
top utility can be used to change the priority of a running process?
Another utility that can also be used to change priority is</b></span><span style="color: black;"><b>
___________</b></span><span style="color: black;"><b>?</b></span><span style="color: black;"><b><br />
</b></span><span style="color: black;">nice<br />
<br />
Both
the top and nice utilities provide the capability to change the
priority of a running process.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>What
command should you type to see all the files with an extension of
'mem' listed in reverse alphabetical order in the /home/ben/memos
directory.<br />
</b></span><span style="color: black;">ls
-r /home/ben/memos/*.mem<br />
<br />
The -c option used with ls
results in the files being listed in chronological order. You can use
wildcards with the ls command to specify a pattern of filenames.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>What
file defines the levels of messages written to system </b></span><span style="color: black;"><b>log
files</b></span><span style="color: black;"><b>?<br />
</b></span><span style="color: black;">kernel.h<br />
<br />
To
determine the various levels of messages that are defined on your
system, examine the kernel.h file.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>What
command is used to remove the password assigned to a group?<br />
</b></span><span style="color: black;">gpasswd
-r<br />
<br />
The gpasswd command is used to change the password
assigned to a group. Use the -r option to remove the password from
the group.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>What
command would you type to use the cpio to create a backup called
backup.cpio of all the users' home directories?<br />
</b></span><span style="color: black;">find
/home | cpio -o > backup.cpio<br />
<br />
The find command is used
to create a list of the files and directories contained in home. This
list is then piped to the cpio utility as a list of files to include
and the output is saved to a file called backup.cpio.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>What
can you type at a command line to determine which shell you are
using?<br />
</b></span><span style="color: black;">echo
$SHELL<br />
<br />
The name and path to the shell you are using is
saved to the SHELL environment variable. You can then use the echo
command to print out the value of any variable by preceding the
variable's name with $. Therefore, typing echo $SHELL will display
the name of your shell.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>What
type of local </b></span><span style="color: black;"><b>file
server</b></span><span style="color: black;"><b>
can you use to provide the distribution installation materials to the
new machine during a </b></span><span style="color: black;"><b>network</b></span><span style="color: black;"><b>
installation?</b></span><span style="color: black;"><b><br />
</b></span><span style="color: black;">A)
Inetd<br />
B) FSSTND<br />
C) DNS<br />
D) NNTP<br />
E) NFS<br />
E -
You can use an NFS server to provide the distribution installation
materials to the machine on which you are performing the
installation. Answers a, b, c, and d are all valid items but none of
them are file servers. Inetd is the superdaemon which controls all
intermittently used network services. The FSSTND is the Linux File
System Standard. DNS provides </span><span style="color: black;">domain
name</span><span style="color: black;">
resolution, and NNTP is the transfer protocol for usenet news.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>If
you type the command cat dog & > cat what would you see on
your display? </b></span><span style="color: black;"><b>Choose
one:<br />
</b></span><span style="color: black;">a.
Any error messages only.<br />
b. The contents of the file dog.<br />
c.
The contents of the file dog and any error messages.<br />
d. Nothing
as all output is saved to the file cat.<br />
<br />
d<br />
<br />
</span><span style="color: black;"><b>When
you use & > for redirection, it redirects both the standard
output and standard error. The output would be saved to the file cat.</b></span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;">You
are covering for another </span><span style="color: black;">system
administrator</span><span style="color: black;">
and one of the users asks you to restore a file for him. You locate
the correct tarfile by checking the backup log but do not know how
the directory structure was stored. What command can you use to
determine this?</span><span style="color: black;"><br />
Choose
one:<br />
a. tar fx tarfile dirname<br />
b. tar tvf tarfile
filename<br />
c. tar ctf tarfile<br />
d. tar tvf tarfile<br />
<br />
(d)<br />
<br />
</span><span style="color: black;"><b>The
t switch will list the files contained in the tarfile. Using the v
modifier will display the stored directory structure.</b></span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;">You
have the /var directory on its own partition. You have run out of
space. What should you do? Choose one:</span><span style="color: black;"><br />
a.
Reconfigure your system to not write to the log files.<br />
b. Use
fips to enlarge the partition.<br />
c. Delete all the log files.<br />
d.
Delete the partition and recreate it with a larger size.<br />
<br />
(d)<br />
<br />
</span><span style="color: black;"><b>The
only way to enlarge a partition is to delete it and recreate it. You
will then have to restore the necessary files from backup.</b></span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;">You
have a new application on a CD-ROM that you wish to install. What
should your first step be?</span><span style="color: black;"><br />
Choose
one:<br />
a. Read the installation instructions on the CD-ROM.<br />
b.
Use the mount command to mount your CD-ROM as read-write.<br />
c. Use
the umount command to access your CD-ROM.<br />
d. Use the mount
command to mount your CD-ROM as read-only.<br />
<br />
(d)<br />
<br />
Before
you can read any of the files contained on the CD-ROM, you must first
mount the CD-ROM.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>When
you create a new partition, you need to designate its size by
defining the starting and ending </b></span><span style="color: black;"><b>_____________</b></span><span style="color: black;"><b>.</b></span><span style="color: black;"><b><br />
</b></span><span style="color: black;">cylinders<br />
<br />
When
creating a new partition you must first specify its starting
cylinder. You can then either specify its size or the ending
cylinder.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>You
need to see the last fifteen lines of the files dog, cat and horse.
What command should you use?<br />
</b></span><span style="color: black;">tail
-15 dog cat horse<br />
<br />
The tail utility displays the end of a
file. The -15 tells tail to display the last fifteen lines of each
specified file.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>Who
owns the data dictionary?<br />
</b></span><span style="color: black;">The
SYS user owns the data dictionary. The SYS and SYSTEM users are
created when the </span><span style="color: black;">database</span><span style="color: black;">
is created.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;">You
routinely compress old log files. You now need to examine a log from
two months ago. In order to view its contents without first having to
decompress it, use the _________ utility.<br />
zcat<br />
<br />
The
zcat utility allows you to examine the contents of a compressed file
much the same way that cat displays a file.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>You
suspect that you have two commands with the same name as the command
is not producing the expected results. What command can you use to
determine the location of the command being run?<br />
</b></span><span style="color: black;">which<br />
<br />
The
which command searches your path until it finds a command that
matches the command you are looking for and displays its full path.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>You
locate a command in the /bin directory but do not know what it does.
What command can you use to determine its purpose.<br />
</b></span><span style="color: black;">whatis<br />
<br />
The
whatis command displays a summary line from the man page for the
specified command.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;">You
wish to create a link to the /data directory in bob's home directory
so you issue the command ln /data /home/bob/datalink but the command
fails. What option should you use in this command line to be
successful.<br />
Use the -F option<br />
<br />
In order to create a
link to a directory you must use the -F option.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>When
you issue the command ls -l, the first character of the resulting
display represents the file's ___________.<br />
</b></span><span style="color: black;">type<br />
<br />
The
first character of the permission block designates the type of file
that is being displayed.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>What
utility can you use to show a dynamic listing of running processes?
__________<br />
</b></span><span style="color: black;">top<br />
<br />
The
top utility shows a listing of all running processes that is
dynamically updated.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>Where
is standard output usually directed?<br />
</b></span><span style="color: black;">to
the screen or display<br />
<br />
By default, your shell directs
standard output to your screen or display.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>You
wish to restore the file memo.ben which was backed up in the tarfile
MyBackup.tar. What command should you type?<br />
</b></span><span style="color: black;">tar
xf MyBackup.tar memo.ben<br />
<br />
This command uses the x switch to
extract a file. Here the file memo.ben will be restored from the
tarfile MyBackup.tar.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>You
need to view the contents of the tarfile called MyBackup.tar. What
command would you use?<br />
</b></span><span style="color: black;">tar
tf MyBackup.tar<br />
<br />
The t switch tells tar to display the
contents and the f modifier specifies which file to examine.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>You
want to create a compressed backup of the users' home directories.
What utility should you use?<br />
</b></span><span style="color: black;">tar<br />
<br />
You
can use the z modifier with tar to compress your archive at the same
time as creating it.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>What
daemon is responsible for tracking events on your
system?<br />
</b></span><span style="color: black;">syslogd<br />
<br />
The
syslogd daemon is responsible for tracking system information and
saving it to specified </span><span style="color: black;">log
files</span><span style="color: black;">.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>You
have a file called phonenos that is almost 4,000 lines long. What
text filter can you use to split it into four pieces each 1,000 lines
long?<br />
</b></span><span style="color: black;">split<br />
<br />
The
split text filter will divide files into equally sized pieces. The
default length of each piece is 1,000 lines.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>You
would like to temporarily change your command line editor to be vi.
What command should you type to change it?<br />
</b></span><span style="color: black;">set
-o vi<br />
<br />
The set command is used to assign environment
variables. In this case, you are instructing your shell to assign vi
as your command line editor. However, once you log off and log back
in you will return to the previously defined command line editor.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>What
account is created when you </b></span><span style="color: black;"><b>install
Linux</b></span><span style="color: black;"><b>?<br />
</b></span><span style="color: black;">root<br />
<br />
Whenever
you install Linux, only one user account is created. This is the
superuser account also known as root.</span></span></span></p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 100%; margin-bottom: 0.19in; margin-top: 0.19in;">
<span style="font-size: small;"><span style="font-family: inherit;"><span style="color: black;"><b>What
command should you use to check the number of files and disk space
used and each user's defined quotas?<br />
</b></span><span style="color: black;"><br />
repquota<br />
<br />
The
repquota command is used to get a report on the status of the quotas
you have set including the amount of allocated space and amount of
used space.</span></span></span></p><p><style type="text/css"><font size="3"><span style="font-family: inherit;">p { margin-bottom: 0.1in; direction: ltr; line-height: 115%; text-align: left; orphans: 2; widows: 2; background: transparent }</span></font></style></p>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-74299016264830609692021-05-17T09:03:00.004-07:002021-05-17T09:04:33.435-07:00Linux Interview questions and answers - 1<div style="text-align: justify;"></div><div style="text-align: justify;"></div><p style="line-height: 150%; margin-bottom: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
attempt to use shadow passwords but are unsuccessful. What
characteristic of the /etc/passwd file may cause this? Choose one: a.
The login command is missing. b. The username is too long. c. The
password field is blank. d. The password field is prefaced by an
asterick. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
create a new user account by adding the following line to your
/etc/passwd file. bobm:baddog:501:501:Bob Morris:/home/bobm:/bin/bash
Bob calls you and tells you that he cannot logon. You verify that he
is using the correct username and password. What is the problem?
Choose one: a. The UID and GID cannot be identical. b. You cannot
have spaces in the line unless they are surrounded with double
quotes. c. You cannot directly enter the password; rather you have to
use the passwd command to assign a password to the user. d. The
username is too short, it must be at least six characters long. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
Which
of the following tasks is not necessary when creating a new user by
editing the /etc/passwd file? Choose one: a. Create a link from the
user’s home directory to the shell the user will use. b. Create the
user’s home directory c. Use the passwd command to assign a
password to the account. d. Add the user to the specified group. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
create a new user by adding the following line to the /etc/passwd
file bobm::501:501:Bob Morris:/home/bobm:/bin/bash You then create
the user’s home directory and use the passwd command to set his
password. However, the user calls you and says that he cannot log on.
What is the problem? Choose one: a. The user did not change his
password. b. bobm does not have permission to /home/bobm. c. The user
did not type his username in all caps. d. You cannot leave the
password field blank when creating a new user. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
When
using useradd to create a new user account, which of the following
tasks is not done automatically. Choose one: a. Assign a UID. b.
Assign a default shell. c. Create the user’s home directory. d.
Define the user’s home directory. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
issue the following command useradd -m bobm But the user cannot
logon. What is the problem? Choose one: a. You need to assign a
password to bobm’s account using the passwd command. b. You need to
create bobm’s home directory and set the appropriate permissions.
c. You need to edit the /etc/passwd file and assign a shell for
bobm’s account. d. The username must be at least five characters
long. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
have created special configuration files that you want copied to each
user’s home directories when creating new user accounts. You copy
the files to /etc/skel. Which of the following commands will make
this happen? Choose one: a. useradd -m username b. useradd -mk
username c. useradd -k username d. useradd -Dk username <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
Mary
has recently gotten married and wants to change her username from
mstone to mknight. Which of the following commands should you run to
accomplish this? Choose one: a. usermod -l mknight mstone b. usermod
-l mstone mknight c. usermod -u mknight mstone d. usermod -u mstone
mknight <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
After
bob leaves the company you issue the command userdel bob. Although
his entry in the /etc/passwd file has been deleted, his home
directory is still there. What command could you have used to make
sure that his home directory was also deleted? Choose one: a. userdel
-m bob b. userdel -u bob c. userdel -l bob d. userdel -r bob <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
All
groups are defined in the /etc/group file. Each entry contains four
fields in the following order. Choose one: a. groupname, password,
GID, member list b. GID, groupname, password, member list c.
groupname, GID, password, member list d. GID, member list, groupname,
password <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
need to create a new group called sales with Bob, Mary and Joe as
members. Which of the following would accomplish this? Choose one: a.
Add the following line to the /etc/group file: sales:44:bob,mary,joe
b. Issue the command groupadd sales. c. Issue the command groupadd -a
sales bob,mary,joe d. Add the following line to the /etc/group file:
sales::44:bob,mary,joe <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
What
command is used to remove the password assigned to a group? <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
changed the GID of the sales group by editing the /etc/group file.
All of the members can change to the group without any problem except
for Joe. He cannot even login to the system. What is the problem?
Choose one: a. Joe forgot the password for the group. b. You need to
add Joe to the group again. c. Joe had the original GID specified as
his default group in the /etc/passwd file. d. You need to delete
Joe’s account and recreate it. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
need to delete the group dataproject. Which two of the following
tasks should you do first before deleting the group? A. Check the
/etc/passwd file to make sure no one has this group as his default
group. B. Change the members of the dataproject group to another
group besides users. C. Make sure that the members listed in the
/etc/group file are given new login names. D. Verify that no file or
directory has this group listed as its owner. Choose one: a. A and C
b. A and D c. B and C d. B and D <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
When
you look at the /etc/group file you see the group kmem listed. Since
it does not own any files and no one is using it as a default group,
can you delete this group? <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
When
looking at the /etc/passwd file, you notice that all the password
fields contain ‘x’. What does this mean? Choose one: a. That the
password is encrypted. b. That you are using shadow passwords. c.
That all passwords are blank. d. That all passwords have expired. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
In
order to improve your system’s <a href="http://www.ittestpapers.com/articles/1195/1/Top-100-Linux-interview-questions/Page1.html" target="_top"><span style="color: #009600;"><u>security</u></span></a>
you decide to implement shadow passwords. What command should you
use? <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
What
file contains the default environment variables when using the bash
shell? Choose one: a. ~/.profile b. /bash c. /etc/profile d. ~/bash <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
have created a subdirectory of your home directory containing your
scripts. Since you use the bash shell, what file would you edit to
put this directory on your path? Choose one: a. ~/.profile b.
/etc/profile c. /etc/bash d. ~/.bash <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
Which
of the following interprets your actions when typing at the command
line for the operating system? Choose One a. Utility b. <a href="http://www.ittestpapers.com/articles/1195/1/Top-100-Linux-interview-questions/Page1.html" target="_top"><span style="color: #009600;"><u>Application</u></span></a>
c. Shell d. Command </span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
What
can you type at a command line to determine which shell you are
using? <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
want to enter a series of commands from the command-line. What would
be the quickest way to do this? Choose One a. Press enter after
entering each command and its arguments b. Put them in a script and
execute the script c. Separate each command with a semi-colon (;) and
press enter after the last command d. Separate each command with a /
and press enter after the last command <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
are entering a long, complex command line and you reach the right
side of your screen before you have finished typing. You want to
finish typing the necessary commands but have the display wrap around
to the left. Which of the following key combinations would achieve
this? Choose One a. Esc, /, Enter b. /, Enter c. ctrl-d, enter d.
esc, /, ctrl-d <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
After
typing in a new command and pressing enter, you receive an error
message indicating incorrect syntax. This error message originated
from.. Choose one a. The shell b. The operating system c. The command
d. The kernel <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
When
typing at the command line, the default editor is the _____________
library. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
typed the following at the command line ls -al /home/ hadden. What
key strokes would you enter to remove the space between the ‘/’
and ‘hadden’ without having to retype the entire line? Choose one
a. Ctrl-B ,
Del b.
Esc-b ,
Del c.
Esc-Del ,
Del d.
Ctrl-b ,
Del <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
would like to temporarily change your command line editor to be vi.
What command should you type to change it? <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
After
experimenting with vi as your command line editor, you decide that
you want to have vi your default editor every time you log in. What
would be the appropriate way to do this? Choose one a. Change the
/etc/inputrc file b. Change the /etc/profile file c. Change the
~/.inputrc file d. Change the ~/.profile file <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
have to type your name and title frequently throughout the day and
would like to decrease the number of key strokes you use to type
this. Which one of your configuration files would you edit to bind
this information to one of the function keys? <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
In
your present working directory, you have the files maryletter memo1
MyTelephoneandAddressBook What is the fewest number of keys you can
type to open the file MyTelephoneandAddressBook with vi? Choose one
a. 6 b. 28 c. 25 d. 4 <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
A
variable that you can name and assign a value to is called a
_____________ variable. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
have installed a new application but when you type in the command to
start it you get the error message Command not found. What do you
need to do to fix this problem? Choose one a. Add the directory
containing the application to your path b. Specify the directory’s
name whenever you run the application c. Verify that the execute
permission has been applied to the command. d. Give everyone read,
write and execute permission to the application’s directory. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
<a href="http://www.ittestpapers.com/articles/1195/1/Top-100-Linux-interview-questions/Page1.html" target="_top"><span style="color: #009600;"><u>telnet</u></span></a>
into several of your <a href="http://www.ittestpapers.com/articles/1195/1/Top-100-Linux-interview-questions/Page1.html" target="_top"><span style="color: #009600;"><u>servers</u></span></a>
simultaneously. During the day, you sometimes get confused as to
which telnet session is connected to which server. Which of the
following commands in your .profile file would make it obvious to
which server you are attached? Choose one a. PS1=’\h: \w>’ b.
PS1=’\s: \W>’ c. PS1=’\!: \t>’ d. PS1=’\a: \n>’
<br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
Which
of the following environment variables determines your working
directory at the completion of a successful login? Choose one a. HOME
b. BASH_ENV c. PWD d. BLENDERDIR <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
Every
time you attempt to delete a file using the rm utility, the operating
system prompts you for confirmation. You know that this is not the
customary behavior for the rm command. What is wrong? Choose one a.
rm has been aliased as rm -i b. The version of rm installed on your
system is incorrect. c. This is the normal behavior of the newest
version of rm. d. There is an incorrect link on your system. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
are running out of space in your home directory. While looking for
files to delete or compress you find a large file called
.bash_history and delete it. A few days later, it is back and as
large as before. What do you need to do to ensure that its size is
smaller? Choose one a. Set the HISTFILESIZE variable to a smaller
number. b. Set the HISTSIZE to a smaller number. c. Set the
NOHISTFILE variable to true. d. Set the HISTAPPEND variable to true.
<br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
In
order to display the last five commands you have entered using the
history command, you would type ___________. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
In
order to display the last five commands you have entered using the fc
command, you would type ___________. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
previously ran the find command to locate a particular file. You want
to run that command again. What would be the quickest way to do this?
Choose one a. fc -l find fc n b. history -l find history n c. Retype
the command d. fc -n find <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
Using
command substitution, how would you display the value of the present
working directory? Choose one a. echo $(pwd) b. echo pwd c. $pwd d.
pwd | echo <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
need to search the entire directory structure to locate a specific
file. How could you do this and still be able to run other commands
while the find command is still searching for your file? Choose one
a. find / -name filename & b. find / -name filename c. bg find /
-name filename d. &find / -name filename & </span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
In
order to create a file called DirContents containing the contents of
the /etc directory you would type ____________. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
What
would be displayed as the result of issuing the command ps ef? Choose
one a. A listing of the user’s running processes formatted as a
tree. b. A listing of the stopped processes c. A listing of all the
running processes formatted as a tree. d. A listing of all system
processes formatted as a tree. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
What
utility can you use to show a dynamic listing of running processes?
__________ <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
The
top utility can be used to change the priority of a running process?
Another utility that can also be used to change priority is
___________? <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
What
key combination can you press to suspend a running job and place it
in the background? <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
issue the command jobs and receive the following output: [1]- Stopped
(tty output) pine [2]+ Stopped (tty output) MyScript How would you
bring the MyScript process to the foreground? Choose one: a. fg %2 b.
ctrl-c c. fg MyScript d. ctrl-z <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
enter the command cat MyFile | sort > DirList & and the
operating system displays [4] 3499 What does this mean? Choose one a.
This is job number 4 and the PID of the sort command is 3499. b. This
is job number 4 and the PID of the job is 3499. c. This is job number
3499 and the PID of the cat command is 4. d. This is job number 4 and
the PID of the cat command is 3499. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
attempt to log out but receive an error message that you cannot. When
you issue the jobs command, you see a process that is running in the
background. How can you fix this so that you can logout? Choose one
a. Issue the kill command with the PID of each running command of the
pipeline as an argument. b. Issue the kill command with the job
number as an argument. c. Issue the kill command with the PID of the
last command as an argument. d. Issue the kill command without any
arguments. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
have been given the job of administering a new server. It houses a
<a href="http://www.ittestpapers.com/articles/1195/1/Top-100-Linux-interview-questions/Page1.html" target="_top"><span style="color: #009600;"><u>database</u></span></a>
used by the sales people. This information is changed frequently and
is not duplicated anywhere else. What should you do to ensure that
this information is not lost? Choose one a. Create a backup strategy
that includes backing up this information at least daily. b. Prepare
a proposal to purchase a backup server c. Recommend that the server
be made part of a cluster. d. Install an additional hard drive in the
server. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
When
planning your backup strategy you need to consider how often you will
perform a backup, how much time the backup takes and what media you
will use. What other factor must you consider when planning your
backup strategy? _________ <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
Many
factors are taken into account when planning a backup strategy. The
one most important one is how often does the file ____________. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
Which
one of the following factors does not play a role in choosing the
type of backup media to use? Choose one: a. How frequently a file
changes b. How long you need to retain the backup c. How much data
needs to be backed up d. How frequently the backed up data needs to
be accessed <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
When
you only back up one partition, this is called a ______ backup.
Choose one a. Differential b. Full c. Partial d. Copy <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
When
you back up only the files that have changed since the last backup,
this is called a ______ backup. Choose one a. Partial b. Differential
c. Full d. Copy </span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
The
easiest, most basic form of backing up a file is to _____ it to
another location. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
When
is the most important time to restore a file from your backup? Choose
one a. On a regular scheduled basis to verify that the data is
available. b. When the system crashes. c. When a user inadvertently
loses a file. d. When your boss asks to see how restoring a file
works. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
As
a system
administrator,
you are instructed to backup all the users’ home directories. Which
of the following commands would accomplish this? Choose one a. tar rf
usersbkup home/* b. tar cf usersbkup home/* c. tar cbf usersbkup
home/* d. tar rvf usersbkup home/* <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
What
is wrong with the following command? tar cvfb / /dev/tape 20 Choose
one a. You cannot use the c option with the b option. b. The correct
line should be tar -cvfb / /dev/tape20. c. The arguments are not in
the same order as the corresponding modifiers. d. The files to be
backed up have not been specified. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
need to view the contents of the tarfile called MyBackup.tar. What
command would you use? __________ <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
After
creating a backup of the users’ home directories called backup.cpio
you are asked to restore a file called memo.ben. What command should
you type? <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
want to create a compressed backup of the users’ home directories
so you issue the command gzip /home/* backup.gz but it fails. The
reason that it failed is that gzip will only compress one _______ at
a time. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
want to create a compressed backup of the users’ home directories.
What utility should you use? <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
routinely compress old log files. You now need to examine a log from
two months ago. In order to view its contents without first having to
decompress it, use the _________ utility. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
Which
two utilities can you use to set up a job to run at a specified time?
Choose one: a. at and crond b. atrun and crontab c. at and crontab d.
atd and crond <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
have written a script called usrs to parse the passwd file and create
a list of usernames. You want to have this run at 5 am
tomorrow
so you can see the results when you get to work. Which of the
following commands will work? Choose one: a. at 5:00
wed
usrs b. at 5:00 wed
-b usrs c. at 5:00 wed
-l usrs d. at 5:00 wed
-d usrs <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
Several
of your users have been scheduling large at jobs to run during peak
load times. How can you prevent anyone from scheduling an at job?
Choose one: a. delete the file /etc/at.deny b. create an empty file
called /etc/at.deny c. create two empty files: /etc/at.deny and
/etc/at.allow file d. create an empty file called /etc/at.allow <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
How
can you determine who has scheduled at jobs? Choose one: a. at -l b.
at -q c. at -d d. atwho <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
When
defining a cronjob, there are five fields used to specify when the
job will run. What are these fields and what is the correct order?
Choose one: a. minute, hour, day of week, day of month, month b.
minute, hour, month, day of month, day of week c. minute, hour, day
of month, month, day of week d. hour, minute, day of month, month,
day of week <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
have entered the following cronjob. When will it run? 15 * * * 1,3,5
myscript Choose one: a. at 15 minutes after every hour on the 1st,
3rd and 5th of each month. b. at 1:15 am ,
3:15 am, and 5:15 am every
day c. at 3:00 pm on
the 1st, 3rd, and 5th of each month d. at 15 minutes after every hour
every Monday, Wednesday, and Friday <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
As
the system administrator you need to review Bob’s cronjobs. What
command would you use? Choose one: a. crontab -lu bob b. crontab -u
bob c. crontab -l d. cronq -lu bob <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
In
order to schedule a cronjob, the first task is to create a text file
containing the jobs to be run along with the time they are to run.
Which of the following commands will run the script MyScript every
day at 11:45 pm ?
Choose one: a. * 23 45 * * MyScript b. 23 45 * * * MyScript c. 45 23
* * * MyScript d. * * * 23 45 MyScript <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
Which
daemon must be running in order to have any scheduled jobs run as
scheduled? Choose one: a. crond b. atd c. atrun d. crontab <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
want to ensure that your system is not overloaded with users running
multiple scheduled jobs. A policy has been established that only the
system administrators can create any scheduled jobs. It is your job
to implement this policy. How are you going to do this? Choose one:
a. create an empty file called /etc/cron.deny b. create a file called
/etc/cron.allow which contains the names of those allowed to schedule
jobs. c. create a file called /etc/cron.deny containing all regular
usernames. d. create two empty files called /etc/cron.allow and
/etc/cron.deny <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
notice that your server load is exceptionally high during the hours
of 10 am to
2 noon .
When investigating the cause, you suspect that it may be a cron job
scheduled by one of your users. What command can you use to determine
if your suspicions are correct? Choose one: a. crontab -u b. crond -u
c. crontab -l d. crond -l <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
One
of your users, Bob, has created a script to reindex his database. Now
he has it scheduled to run every day at 10:30 am .
What command should you use to delete this job. Choose one: a.
crontab -ru bob b. crontab -u bob c. crontab -du bob d. crontab -lu
bob <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
What
daemon is responsible for tracking events on your system? <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
What
is the name and path of the default configuration file used by the
syslogd daemon? <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
have made changes to the /etc/syslog.conf file. Which of the
following commands will cause these changes to be implemented without
having to reboot your computer? Choose one: a. kill SIGHINT `cat
/var/run/syslogd.pid` b. kill SIGHUP `cat /var/run/syslogd.pid` c.
kill SIGHUP syslogd d. kill SIGHINT syslogd <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
Which
of the following lines in your /etc/syslog.conf file will cause all
critical messages to be logged to the file /var/log/critmessages?
Choose one: a. *.=crit /var/log/critmessages b. *crit
/var/log/critmessages c. *=crit /var/log/critmessages d. *.crit
/var/log/critmessages <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
wish to have all mail messages except those of type info to the
/var/log/mailmessages file. Which of the following lines in your
/etc/syslogd.conf file would accomplish this? Choose one: a.
mail.*;mail!=info /var/log/mailmessages b. mail.*;mail.=info
/var/log/mailmessages c. mail.*;mail.info /var/log/mailmessages d.
mail.*;mail.!=info /var/log/mailmessages <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
What
is the name and path of the main system log? <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
Which
log contains information on currently logged in users? Choose one: a.
/var/log/utmp b. /var/log/wtmp c. /var/log/lastlog d.
/var/log/messages <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
have been assigned the task of determining if there are any user
accounts defined on your system that have not been used during the
last three months. Which log file should you examine to determine
this information? Choose one: a. /var/log/wtmp b. /var/log/lastlog c.
/var/log/utmp d. /var/log/messages <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
have been told to configure a method of rotating log files on your
system. Which of the following factors do you not need to consider?
Choose one: a. date and time of messages b. log size c. frequency of
rotation d. amount of available disk space </span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
What
utility can you use to automate rotation of logs? <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
wish to rotate all your logs weekly except for the /var/log/wtmp log
which you wish to rotate monthly. How could you accomplish this.
Choose one: a. Assign a global option to rotate all logs weekly and a
local option to rotate the /var/log/wtmp log monthly. b. Assign a
local option to rotate all logs weekly and a global option to rotate
the /var/log/wtmp log monthly. c. Move the /var/log/wtmp log to a
different directory. Run logrotate against the new location. d.
Configure logrotate to not rotate the /var/log/wtmp log. Rotate it
manually every month. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
You
have configured logrotate to rotate your logs weekly and keep them
for eight weeks. You are running our of disk space. What should you
do? Choose one: a. Quit using logrotate and manually save old logs to
another location. b. Reconfigure logrotate to only save logs for four
weeks. c. Configure logrotate to save old files to another location.
d. Use the prerotate command to run a script to move the older logs
to another location. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
What
command can you use to review boot messages? <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
What
file defines the levels of messages written to system log files? <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
What
account is created when you install Linux? <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
While
logged on as a regular user, your boss calls up and wants you to
create a new user account immediately. How can you do this without
first having to close your work, log off and logon as root? Choose
one: a. Issue the command rootlog. b. Issue the command su and type
exit when finished. c. Issue the command su and type logoff when
finished. d. Issue the command logon root and type exit when
finished. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
Which
file defines all users on your system? Choose one: a. /etc/passwd b.
/etc/users c. /etc/password d. /etc/user.conf <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
There
are seven fields in the /etc/passwd file. Which of the following
lists all the fields in the correct order? Choose one: a. username,
UID, GID, home directory, command, comment b. username, UID, GID,
comment, home directory, command c. UID, username, GID, home
directory, comment, command d. username, UID, group name, GID, home
directory, comment <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
Which
of the following user names is invalid? Choose one: a. Theresa Hadden
b. thadden c. TheresaH d. T.H. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
In
order to prevent a user from logging in, you can add a(n) ________at
the beginning of the password field. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
The
beginning user identifier is defined in the _________ file. <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
Which
field is used to define the user’s default shell? <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
Bob
Armstrong, who has a username of boba, calls to tell you he forgot
his password. What command should you use to reset his command? <br />
<br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="line-height: 150%; margin-bottom: 0.19in; margin-top: 0.19in; text-align: left;"><span style="font-size: small;"><span style="font-family: inherit;">
Your
company has implemented a policy that users’ passwords must be
reset every ninety days. Since you have over 100 users you created a
file with each username and the new password. How are you going to
change the old passwords to the new ones? Choose one: a. Use the
chpasswd command along with the name of the file containing the new
passwords. b. Use the passwd command with the -f option and the name
of the file containing the new passwords. c. Open the /etc/passwd
file in a text editor and manually change each password. d. Use the
passwd command with the -u option. </span></span>
</p><span style="font-size: small;"><span style="font-family: inherit;">
</span></span><p style="text-align: left;"><style type="text/css"><font size="3"><span style="font-family: inherit;">p { margin-bottom: 0.1in; direction: ltr; line-height: 115%; text-align: left; orphans: 2; widows: 2; background: transparent }a:link { color: #000080; so-language: zxx; text-decoration: underline }</span></font></style></p>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-23783310270187321562021-04-08T08:38:00.009-07:002021-04-08T08:38:55.883-07:00Uninstall libre office from Linux Lite 5.2<p><b>Step 1:</b> Follow the below commands one by one to uninstall libre office. <br /></p><p>$sudo apt-get remove --purge libreoffice*<br />$sudo apt-get clean<br />$sudo apt-get autoremove</p><p><b>Step 2:</b> To remove the menu options, these following steps will help us.</p>#cd /home/<username>/.local/share/applications/ <br />#rm -rf libre*<br /><p>Menus will disappear after this.</p>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0tag:blogger.com,1999:blog-6241881048256348214.post-86779402715877397122021-04-05T09:29:00.002-07:002021-04-05T09:29:30.053-07:00Linux Notes<p>The cron utility runs based on commands specified in a cron table (crontab)<br /><br />Each user, including root, can have a cron file. These files don't exist by default, but can be created in the /var/spool/cron directory using the crontab -e command that's also used to edit a cron file (see the script below). I strongly recommend that you not use a standard editor (such as Vi, Vim, Emacs, Nano, or any of the many other editors that are available). Using the crontab command not only allows you to edit the command, it also restarts the crond daemon when you save and exit the editor.<br /><br />The crontab command uses Vi as its underlying editor, because Vi is always present (on even the most basic of installations).<br /><br /><br />crontab -e<br /><br />SHELL=/bin/bash<br /><br />MAILTO=root@example.com<br /><br />PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin<br /><br /># Example of job definition:<br /><br /># .---------------- minute (0 - 59)<br /><br /># | .------------- hour (0 - 23)<br /><br /># | | .---------- day of month (1 - 31)<br /><br /># | | | .------- month (1 - 12) OR jan,feb,mar,apr ...<br /><br /># | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat<br /><br /># | | | | |<br /><br /># * * * * * user-name command to be executed<br /><br /><br /># Set the hardware clock to keep it in sync with the more accurate system clock<br /><br />03 05 * * * /sbin/hwclock --systohc<br /><br /><br /># Perform monthly updates on the first of the month<br /><br /># 25 04 1 * * /usr/bin/dnf -y update<br /><br />Task: List all your cron jobs<br />Type the following command:<br /># crontab -l<br /># crontab -u username -l<br />To remove or erase all crontab jobs use the following command:<br /># Delete the current cron jobs #<br />crontab -r<br />## Delete job for specific user. Must be run as root user ##<br />crontab -r -u username<br /><br /><br />Understanding Default /etc/crontab<br />Typical /etc/crontab file entries:<br />SHELL=/bin/bash<br />PATH=/sbin:/bin:/usr/sbin:/usr/bin<br />MAILTO=root<br />HOME=/<br /><br /># run-parts<br />01 * * * * root run-parts /etc/cron.hourly<br />02 4 * * * root run-parts /etc/cron.daily<br />22 4 * * 0 root run-parts /etc/cron.weekly<br />42 4 1 * * root run-parts /etc/cron.monthly<br /><br />crond and cron jobs log file<br />You can use the cat command/grep command/tail command to view crond log file. For example, on a CentOS 7 Linux on can use the following commands:<br /><br />cat /var/log/cron<br />tail -f /var/log/cron<br />grep "my-script.sh"<br />tail -f /var/log/cron<br /><br /><br />On modern Linux distro one can use the systemctl command or journalctl command:<br />sudo systemctl status cron<br />sudo journalctl -u cron<br /><br /><br /><br />how to block not to run cron jobs for user:<br /><br />Add user name into file /etc/cron. deny, each user per line (Typical method which affect only listed users in the file). The other easy workaround is to have the /etc/cron. deny file empty and add only root user name in to the file /etc/cron.<br /><br /><br /><br />https://www.thegeekdiary.com/how-to-prevent-non-root-user-from-creating-crontab-entry-in-linux/<br /><br />File permissions:<br /><br />https://www.linux.com/training-tutorials/understanding-linux-file-permissions/<br /><br /><br />u – Owner<br />g – Group<br />o – Others<br />a – All users<br /><br />r – Read<br />w – Write<br />x – Execute<br /><br />chmod u+rw file1<br /><br />Using Binary References to Set permissions<br /><br />A sample permission string would be chmod 640 file1, which means that the owner has read and write permissions, the group has read permissions, and all other user have no rights to the file.<br /><br />r = 4<br />w = 2<br />x = 1<br /> </p><p>SUID, SGID and sticky bit<br /><br /><br />https://www.thegeekdiary.com/linux-interview-questions-special-permissions-suid-sgid-and-sticky-bit/<br /><br />There are two special permissions that can be set on executable files: <br />Set User ID (setuid) and Set Group ID (sgid). These permissions allow the file being executed to be executed with the privileges of the owner or the group.<br /><br />Similarly, there are two special permissions for directories: the sticky bit and the setgid bit. <br /><br />What is Set User ID (setuid)<br />SUID is a special permission assigned to a file. These permissions allow the file being executed to be executed with the privileges of the owner. For example, if a file was owned by the root user and has the setuid bit set, no matter who executed the file it would always run with root user privileges.<br /><br />How to set SUID bit on a file:<br />You must be the owner of the file or the root user to set the setuid bit. <br />Run the following command to set the setuid bit:<br /><br /># chmod u+s file1<br /># verify the file permission<br /># ls -ld fil2<br /><br />#root@oc1784140854 Filepermissions]# touch file1<br />#root@oc1784140854 Filepermissions]# ls -lrt<br />-rw-r--r-- 1 root root 0 Jun 17 13:58 file1<br /> <br />#root@oc1784140854 Filepermissions]# chmod u+s file1<br /><br />[root@oc1784140854 Filepermissions]# ls -l file1 <br />-rwSr--r-- 1 root root 0 Jun 17 13:58 file1<br /><br /><br />Note the capital S. This means there are no execute permissions. Run the following command to add execute permissions to the file1 file, noting the lower case s.<br /><br /># [root@oc1784140854 Filepermissions]# chmod u+x file1<br /><br /> [root@oc1784140854 Filepermissions]# ls -ld file1 <br />-rwsr--r-- 1 root root 0 Jun 17 13:58 file1<br /><br /><br />Alternatively, you can set the setuid bit using the numeric method by prepending a 4 to the mode. For example, to set the setuid bit, read, write, and execute permissions for the owner of the file1 file, run the following command:<br /># chmod 4700 file1<br /><br /><br />What is Set Group ID (setgid) for files<br /><br />When the Set Group ID bit is set, the executable is run with the authority of the group. For example, if a file was owned by the users’ group, no matter who executed that file it would always run with the authority of the user’s group.<br />How to set the SGID bit for files?<br />Run the following command as to set the setgid bit on the file1 file:<br /># chmod g+s<br />Note: Both the setuid and setgid bits are set using the s symbol. The setgid is represented the same as the setuid bit, except in the group section of the permissions.<br /><br />[root@oc1784140854 Filepermissions]# chmod g+s file1 <br />[root@oc1784140854 Filepermissions]# ls -l file1 <br />-rwsr-Sr-- 1 root root 0 Jun 17 13:58 file1<br /><br />Run the following command as root to set the setgid bit, and read, write, and execute permissions for the owner of the file1 file:<br />[root@oc1784140854 Filepermissions]# chmod 2700 file1 <br />[root@oc1784140854 Filepermissions]# ls -l file1 <br />-rwx--S--- 1 root root 0 Jun 17 13:58 file1<br /><br /><br />#Use the chmod g+s command to set the setgid bit.<br /><br />How to set GUID on a file?<br /># chmod 2555 [path_to_file]<br /><br />(base) [root@oc1784140854 Filepermissions]# chmod 2555 file1 <br />(base) [root@oc1784140854 Filepermissions]# ls -l file1 <br />-r-xr-sr-x 1 root root 0 Jun 17 13:58 file1<br /><br /><br />What is Set Group ID permissions for directories<br />When the setgid bit is set on a directory, all files created within said directory inherit the group ownership of that directory. For example, the folder1 folder is owned by the user user1, and the group group1<br /><br />[root@oc1784140854 Filepermissions]# mkdir folder1<br /><br />[root@oc1784140854 Filepermissions]# chmod 664 folder1/<br /><br />[root@oc1784140854 Filepermissions]# cd folder1/<br />[root@oc1784140854 folder1]# touch file1<br />[root@oc1784140854 folder1]# pwd<br />/opt/Filepermissions/folder1<br /><br />[root@oc1784140854 folder1]# chmod 664 file1<br /><br />How to set the SGID bit for directories?<br />To set the setgid bit on a directory, use the chmod g+s command:<br />(base) [root@oc1784140854 Filepermissions]# chmod g+s folder1<br />(base) [root@oc1784140854 Filepermissions]# ls -ld folder1/<br />drw-rwSr-- 2 root root 4096 Jun 17 14:19 folder1/<br /><br />(base) [root@oc1784140854 Filepermissions]# <br /><br />change the S – to small s – use this command – chmod g+x folder1<br /><br />(base) [root@oc1784140854 Filepermissions]# chmod g+x folder1<br /><br />(base) [root@oc1784140854 Filepermissions]# ls -ld folder1<br />drw-rwsr-- 2 root root 4096 Jun 17 14:19 folder1<br />(base) [root@oc1784140854 Filepermissions]# <br /><br /><br />Alternatively, prepend a 2 to the directories mode:<br /># chmod 2770 folder1<br /><br />What is sticky bit on a directory<br /><br />When the sticky bit is set on a directory, only the root user, the owner of the directory, and the owner of a file can remove files within said directory.<br />Eventhouh has write permissions<br /><br />An example of the sticky bit is the /tmp directory. Use the ls -ld /tmp command to view the permissions:<br /><br /> [root@oc1784140854 Filepermissions]# ls -ld /tmp/<br />drwxrwxrwt 25 root root 640 Jun 17 14:29 /tmp/<br /> <br />[root@oc1784140854 Filepermissions]# <br /><br />The t at the end symbolizes that the sticky bit is set. A file created in the /tmp directory can only be removed by its owner, or the root user. For example, run the following command to set the sticky bit on the folder1 folder:<br /><br />[root@oc1784140854 Filepermissions]# chmod a+t folder1/<br />[root@oc1784140854 Filepermissions]# ls -ld folder1/<br /><br />drw-rwsr-T 2 root root 4096 Jun 17 14:19 folder1/<br /><br />[root@oc1784140854 Filepermissions]# chmod a+x folder1<br /><br />[root@oc1784140854 Filepermissions]# ls -ld folder1<br />drwxrwsr-t 2 root root 4096 Jun 17 14:19 folder1<br /><br />[root@oc1784140854 Filepermissions]# <br /> <br />Alternatively, prepend a 1 to the mode of a directory to set the sticky bit:<br /># chmod 1777 folder1<br /> <br /><br />how to find files with SUID/SGID but set<br />1. To find all the files with SUID but set, use the below command :<br /># find / -perm /4000<br />2. Tofind all the files with SGID bit set, use the below command :<br /># find / -perm /2000<br /><br />how to find out sticky bit directories <br /><br />find / -type d -perm -1000 -exec ls -ld {} \;<br /></p>PNA Prasannahttp://www.blogger.com/profile/03270770845421832069noreply@blogger.com0