Showing posts with label Linux Addiction. Show all posts
Showing posts with label Linux Addiction. Show all posts

Thursday, January 11, 2024

Linux Process Management Instructor Guide

https://www.amazon.com/dp/B0CRY8TZ1K/

In a Linux system, utilizing commands to manage processes is an essential part of working in the environment. Especially, if a process becomes stuck, it could indeed take on all the system resources. This processing could include foreground and background processes. Therefore, this instructor guide covers the most common ways to stop and manage processes. The commands can be utilized for personal, educational, or corporate usage. It is envisioned that the instructor utilize the material from this guide via a demonstration type format.

Contents

How to use and run commands

Foreground vs Background Processes

jobs

fg

bg

Commands to Find Processes

ps

ps -a

ps -u

ps aux | grep firefox

ps -ef | grep name

pgrep

pgrep -lu root

pgrep -n

pgrep -o

pgrep -i sh

pidof

pidof -s sh

pidof -c sh

pidof -x sh

top

kill, killall, pkill

kill

ps -ef

killall

killall firefox

killall -l

pkill

pkill firefox

Process Signals

Sending Signals

ps -ef

kill -15 63

kill -TERM 63

killall -15 63

killall -TERM 63

pkill -15 63

pkill -TERM 63

Conclusion

About the Author

Notes

Thursday, December 28, 2023

Linux - Chkconfig

The following is a Linux dictionary word of the day:

chkconfig command that handles and shows the runlevel of the services at each of the stages being run within Linux.

Example: chkconfig




Thursday, November 9, 2023

Linux Log Parsing Instructor Guide

https://www.amazon.com/dp/B0CLKZF879/

Logs are a critical aspect of a Linux system as they provide valuable information utilized for troubleshooting, performance analysis, security, and compliance. The concepts and examples presented here explore specific commonly utilized ways to parse logs, accompanied by practical and advanced command examples to demonstrate their usage in real-world scenarios.

The material will be useful to a system administrator, power user, end user or student looking to further their knowledge in this area. 

The guide is meant to be utilized by an individual whom will be reviewing via demonstration format these core topics. After each example, the commands, parameters, and options are explained.

Contents

How to use and run commands

Common Linux System Logs

Awk

Cut

Diff

Grep

Sed

Sort

Uniq

Vimdiff

Wc

Monday, October 23, 2023

Linux - Chroot

The following is a Linux dictionary word of the day:

chroot command to change the root directory.

Example: chroot /path/new_root


Tuesday, September 26, 2023

Linux - Chpasswd

The following is a Linux dictionary word of the day: 
chpasswd – allows updated passwords in batch mode.
Example:
chpasswd
user1 newpassword1
user2 newpassword2

Note: when done update of username password setting enter in Ctrl-D on the keyboard. 

Monday, August 28, 2023

Linux - Chown

The following is a Linux dictionary word of the day:

chown – change the user and/or group ownership of a given file or directory.

-R parameter for recursive traverse through all contents where command is run from.

Note: only a user with root access can use the chown command.

Example: chown -R root:name_of_group name_of_folder


Tuesday, August 15, 2023

Linux Wildcard and Meta Characters Instructor Guide

https://www.amazon.com/dp/B0CFQ1S3L4/

In Linux, wildcards and meta-characters are invaluable tools for efficient file manipulation and pattern matching. The concepts and examples presented here explore specific commonly utilized wildcards and metacharacters, accompanied by practical and advanced command examples to demonstrate their usage in real-world scenarios. The material will be useful to a system administrator, power user, end user or student looking to further their knowledge in this area. 

The guide is meant to be utilized by an individual who will be reviewing via demonstration format these core topics.

Contents

Instructor or End User Set-up:

Create Example Files:

Common Wildcards:

Asterisk (*)

Question mark (?)

Square brackets ([])

Curly braces ({})

Tilde (~)

Backslash (\)

Exclamation mark (!)

Common Character Classes:

Asterisk (*)

Question Mark (?)

Range of Characters ([])

[characters]

[!characters]

[[:class:]]:

[[:alnum:]]

[[:alpha:]]

[[:digit:]]

[[:lower:]]

[[:upper:]]

Common Meta-Characters:

Pipe (|)

Greater than (>)

Double greater than (>>)

Less than (<)

Caret (^)

Dollar Sign ($)

Ampersand (&)

Semicolon (;)

Combining Wildcards and Meta-Characters

Conclusion:

About the Author:

Notes:

Saturday, July 1, 2023

Linux - Chgrp

The following is a Linux dictionary word of the day:

chgrp changes group ownership to a said group.

-R parameter for recursive traverse through all contents where command is run from.

Example: chgrp -R root name_of_folder

Monday, June 12, 2023

Linux - Child process

The following is a Linux dictionary word of the day:

child process – process created by another process (which would be the parent process). Each process may create many child processes but will have only one parent process.

Tuesday, June 6, 2023

Linux - Chfn

The following is a Linux dictionary word of the day:

chfn – utilized to modify finger command based information. The information is stored in the /etc/passwd location. It includes the user's name, work location, work phone number, and home phone number.

Example: chfn


Wednesday, May 31, 2023

Linux - Checkeq (eqn or neqn)

The following is a Linux dictionary word of the day:

checkeq (eqn or neqn) – command utilized to describe equation aspects.

-v parameter to print version.

Example: eqn hello.c


  

Sunday, May 28, 2023

Linux - Cfdisk

The following is a Linux dictionary word of the day:

cfdisk – partition table manipulator for a Linux drive.

m = option used to maximize the disk usage of the current partition.

-h parameter display for help text.

-V parameter to display version information.

Example: cfdisk -V

Monday, May 15, 2023

Linux - CD

The following is a Linux dictionary word of the day:

cd (also can be chdir)  change directory.

cd .. moves backwards to the next higher subdirectory level.

cd / moves  to the highest root directory level.

Examples:

cd tmp

cd ..

cd /


Sunday, April 23, 2023

Linux - CC

The following is a Linux dictionary word of the day:

cc – executes the systems C coding compiler. By default, the output will be written to the executable file a.out.

-o parameter to output the executable file to the name of ones choosing.

Examples:

cc thefile.c

cc thefile.c -o mynewfile


Tuesday, April 4, 2023

Linux - Cat

The following is a Linux dictionary word of the day:

cat is short for catenate and used to display content, usually from file and directories.

/proc/ is a virtual file system that contains information about process and system information.

/proc/meminfo – information related to the memory in the system.

/proc/uptime – shows number of seconds the system is up and running. The second value in the listing shows the total number of idle seconds for each central processing unit (CPU).

Examples:

cat /proc/

cat /proc/meminfo

cat /proc/uptime


Tuesday, March 21, 2023

Linux - Case

The following is a Linux dictionary word of the day:

case command utilized to conditionally perform a command based on its value.

Example:

#!/bin/sh
echo "Enter command (who, list, or cal)"
     read command
     case "$command" in
      who)
           echo "Running who"
           who
           ;;
     list)
           echo "Running ls"
           ls
           ;;
     cal)
           echo "Running cal"
           cal 
           ;;
     *)
           echo "Bad command"
           ;;
     esac
     exit 0

Tuesday, February 28, 2023

Linux Useful One Liner Commands Instructor Guide


Linux is utilized within the world of information technology in a very broad manner. Therefore, the items presented here are useful one liner commands that encompass real world scenarios that are applicable to a system administrator, power user and an end user or student looking to further their knowledge in this area. 
The guide is meant to be utilized by an individual whom will be reviewing via demonstration format these useful one liner commands.

Table of Contents:

Display and List One-Liners
List Hidden Files And Directories First:
Displays Build of Distribution:
Display Disk Usage in Human Readable Format:
Display Only The Total Disk Usage (Summary) Of Current Directory:
Display Day Of The Year:
Display Lines From Head And Tail:
Press A Key To Continue:
Shows Size Of Files And Directories Sorted:
Count Files In Current Directory:
Monitoring And Using One-Liners
Most Used Commands:
Monitor CPU Speed:
View All Network Activity In Real Time:
View The TCP Connection Status By Group:
Monitoring Kernel Messages:
Total Disk Space Used In Current Directory And Root Directory:
Process Tree With Details:
Check CPU Architecture:
Services And Processes Related One-Liners
Get Running Services By Port Number:
Processes Per User Count:
File Related One-Liners
Find And Delete Specific Type Of Files:
Find All Files And Paths That Do Not Have .txt:
Find Latest Version Of Given File:
Find Files That Contain test, hello and txt:
Find Open Files:
Test Text Writing With Delay:
Vertical Text Display:
Create Sequence Of Numbers 1 To 15 In Perl:
Display Today’s Date:
Octal Dump Of A File:
Run Multiple Commands Against A File:
Match Characters In A String And Return The Matches In Groups Of Two Characters:
Match 10 Characters In A String:
Match Characters Between Brackets:
Search C File And Output Printf Statement:
Search C File And Output Printf And Return Statements:
Match String In C File That Starts With The (" and Ends With the "):

Monday, January 30, 2023

Linux Vision with a Project

When using Linux, a project needs to have the following for the overall success strategy:

  • Scope of the project.
  • Define the project team.
  • Define the project sponsors.
  • Define the critical success factors of the project.
  • Create the project charter.
  • Create a project communications model which will be utilized.

Sunday, January 22, 2023

Aspects for a Linux Business Process

The following are the high-level aspects to realize as part of a Linux business process:

1) Has a goal with inputs and outputs.

2) Uses resources having a number of activities.

3) Will affect many departments across the organization.

4) Will create value to users.