4/15/2020

부자가 되고 싶다면 절대 해선 안 될 5가지

** 부자가 되고 싶다면 절대 해선 안 될 5가지


` 가격표에 속지 마라!


` 무료 체험을 절대 하지 마라!


- 부존자원 효과 : 한 번 준 것을 돌려달라고 하는 것은 처음부터 주지 않은 것보다 큰 반감을 갖게 만드는 효과.

- 손실 회피 성향 : 어떤 물건을 획득함으로써 얻게 되는 효용보다 그 대상을 잃게 됨으로써 느끼는 비효용이 훨씬 크다는 것.


` 지인 추천으로 물건을 덥석사지 마라!

- 절대 평가 방식 : 하나만 보여주고 지불 의사를 묻는 것. : 직관적으로 쉽게 평가할 수 있는 부분에 의존하여 판단하는 경향이 생기므로 착오가 일어남.

- 상대 평가 방식 : 두 가지를 함께 제시하여 지불 의사를 묻는 것.


` 청각에 현혹되지 마라!

- 시각적 요소 : 40.4%

- 청각적 요소 : 23.5%


` 이사할 때 가구를 새로 사지마라!

- 신차의 옵션

- 새로운 집으로 이사 갈 때, 신상 가구들


`` 결론 : 지갑을 열기 전에, 꼭 필요한 물건인지, 이 물건의 가격이 적당한지, 기업의 마케팅 전략에 지갑을 털리고 있는 것은 아닌지 생각해보고 구매한다.


---------------------------------------------------------------------



`` 부자들이 죽어도 지키는 3가지 법칙


` 평범한 사람들은 결과를 중시하지만, 부자들은 과정을 중시한다. 


` 돈보다 시간을 더 중요하게 생각한다. 

- 자신이 가장 잘 할 수 있는 일에 본인의 시간을 쏟아부어 남들보다 앞서 나간다.


` 진입장벽을 높이고 또 높인다.

- 진입장벽이 높게 구축되면 그 이후로는 돈이 돈을 버는 구조로 전환된다.


---------------------------------------------------------------------


`` 가난한 사람들의 6가지 습관


` 가난한 사람들은 인생 한방을 노리고 부자들은 과정을 중시한다. 

- 부를 얻는 것은 하나의 사건이 아니라 일련의 과정이다.

- 스스로 번 돈은 스스로 만든 행운으로부터 온다.


` 가난한 사람들은 부자처럼 보이길 원하고, 부자들은 자유를 추구한다.

- 3F : 가족(Family), 건강(Fitness), 자유(Freedom) 충족될 때, 진정한 부와 행복을 느낌.

- 자유 : 원하는 방식, 원하는 모습으로 원하는 시기에 원하는 곳에서 사는 자유.


` 가난한 사람들은 돈으로 행복을 살 수 있다고 착각한다.


` 가난한 사람들은 인생을 남의 손에 맡기고 늘 남 탓을 하며 산다.


` 가난한 사람들은 절약을 통해 천천히 부자 되는 것을 목표로 삼는다.

- 스스로 재무계획 통제


` 가난한 사람들은 학력에 집착한다.

---------------------------------------------------------------------


`` 부자들이 죽어도 지키는 사소한 습관


` 모바일 메신저에 즉시 답변하지 않는다.

` 자신에게 쓰는 돈을 아끼지 않는다.

` 남에게 '시간'을 선물한다. 

` 감정의 기복이 크지 않고, 안정된 기분을 유지한다.

` 탄탄한 몸매와 분위기를 관리한다.

` 불안, 걱정을 크게 신경쓰지 않는다.

` 돈에 대해 무지한 것은 죄다.


---------------------------------------------------------------------






성공

** 성공 하는 원칙


` 내적 욕구를 폭발 시켜라!

- 메라키(MERAKI) : 내가 하는 일에 나 자신을 쏟는다. 결의, 열의, 열정



` 성공하는 습관을 만들고, 실천을 멈추지 마라!

- "새벽의 어둠 속에서 사람의 눈을 속인다면, 그 모든 게 밝은 불빛 아래에서 다 드러나게 된다." - 조 프레이저 : 권투 선수 -



` 자신의 성공을 확신하라!

- "당신은 나만큼 시간을 쏟지 않기 때문에 절대 나보다 더 잘할 수 없다. 그래서 난 이미 승리한 것이다." - 코비 브라이언트 : 농구 선수 -

- "오늘 하루도 멋진 하루로 만들 거라는 걸 알고, 매일 아침 얼굴에 미소 지으며 일어나는 것." - 큐반 : 스포츠 경영인 -



- 현실에 안주하는 것은 성장의 적이다. 가능한 한 자주 한계를 뛰어넘는 일에 도전하자.

- 육체적으로 불편해지면 정신적 연결이 생겨난다. 안전지대 밖으로 당장 뛰쳐 나가라!

- 모든 성공하고 똑똑하고 투지 넘치는 사람들은 끼리끼리 어울린다.

- 삶에서든 사업에서든 당신은 다른 그 누구와 경쟁하는 것이 아니다. 늘 자신과 경쟁한다.

- 도전 과제를 잘게 쪼개 관리하라. 그런 다음, 그것을 하나씩 처리하라.

- 삶을 의무가 아닌 특권의 연속으로 보라. '어쩔 수 없이 해야 하는 것들'을 '스스로 하기로 한 것들'로 바꾸어라. 나는 어쩔 수 없이 산에 오른 것이 아니라 내가 산에 오르기로 한 것이다.

- 결국 성공이란 우리가 매일 하는 작은 습관들의 결과이다.


---------------------------------------------------------------------



`` 성공과 행복의 7가지 절대 법칙


` 남들이 뭐라 하든, 자신의 길을 가라.

- 명확한 꿈 + 끝까지 하겠다는 의지


` 가장 중요한 일은 가장 먼저 하라.

- 주어진 시간을 가장 중요한 일에 투자하는 것.

- 목표와 밀접한 관련이 있는 일이 가장 중요한 일이다.


` 다른 사람보다 하나 더 생각하라.

- 지식을 배우려면 생각하고, 또 생각하는 것을 잘해야 한다. - 아인슈타인 -


` 생각을 열면 천당, 열지 않으면 지옥이다. 

- 관점에 따라 모든 것이 변한다.


` 내려놓을 수 없는 것은 없다.


` 즐거운 척 하면 진짜 즐거워진다.


` 과거도 미래도 아닌 현재에 깨어 있어라.


---------------------------------------------------------------------


`` 해서는 안 되는 행동 5가지 


` 핑계대는 것

` 비판이나 경멸에 좌절하는 것

` 두렵다고 중간에 그만 두는 것

` 영감이 떠오르기를 기다리는 것

` 남의 도움이 필요할 때 요청하지 않는 것


---------------------------------------------------------------------


`` 독이 되는 친구


` 경쟁자 : 지나친 경쟁적인 친구


` 자아도취가 심한 친구


` 착취자 : 항상 옆에 있어주길 바라는 친구


` 흠 잡는 자 : 지나치게 비판적인 친구


---------------------------------------------------------------------



4/13/2020

Linux Administration

** Linux Administration


` Creating a User

` Add new user Account Using Terminal

- sudo adduser username


` Deleting, disabling account

1. Remove Password Information : sudo passwd -l username

2. Delete Account : sudo userdel -r username


` Adding users to the usergroups

- sudo usermod -a -G GROUPNAME USERNAME

- Adding group mail : sudo usermod -a -G mail USERNAME

- groupmod + Tab Key Twice : all group print


` Removing a user from Usergroup

- sudo deluser USER GROUPNAME

- sudo apt-get install gnome-system-tools


`` Recap

- You can use both GUI or Terminal for User Administration.

- You can create, disable and remove user accounts.

- You can add/delete a user to a usergroup.


- sudo adduser : Adds a user

- sudo passwd -l 'username' : Disable a user

- sudo userdel -r 'username' : Delete a user

- sudo usermod -a -G GROUPNAME USERNAME : Add user a to a usergroup

- sudo deluser USER GROUPNAME : Remove user from a user group

- finger : Gives information on all logged users

- finger username : Gives information of a particular user

Virtual Terminals

** Virtual Terminals


- Used for executing commands and offering input

- You cannot use the mouse with the Virtual Terminals

- Distinguished feature of Linux


` Virtual Terminal

- Press Ctrl + Alt + F1

- Enter User ID and Password


` Navigation

- Ctrl + Alt + F(1 to 6) key


- Home or Ctrl + a : Move the cursor to the start of the current line

- End or Ctrl + e : Move the cursor to the end of the current line

- Tab : Autocomplete commands

- Ctrl + u : Erase the current line

- Ctrl + w : Delete the word before the cursor

- Ctrl + k : Delete the line from the cursor position to the end

- reset : Reset the terminal

- history : List of commands executed by the user

- Arrow up : Scroll up in history and enter to execute

- Arrow down : Scroll down in history and enter to execute

- Ctrl + d : Logout from the terminal

- Ctrl + Alt + Del : Reboot the system


` Recap

- Virtual terminals are CLIs which execute the user commands.

- There are six virtual terminals which can be launched using the shortcut keys.

- They offer multi-user environment and up to six users can work on them at the same time.

- Unlike terminals you cannot use mouse with virtual terminals.

- To launch a virtual terminal press Ctrl+Alt+F(1 to 6) on the keyboard and use the same command to navigate.

- To return to the home screen of the Linux system, use Ctrl+Alt+F7 and it would take to you the terminal.




Perl Programming

** Perl Programming


` What is Perl?

- Create programs

- Handle Datebases and e-mails

- GUI(Graphical User Interface) development

- Networking and System Administration


` PERL vs. Shell Scripting

- Perl does not cause portability issues.

- Error handling is very easy on Perl.

- Writing long and complex programs on Perl is easy.

- Shell has fewer reusable libraries available compared to Perl's CPAN.

- Shell is less secure.


` How to Create PERL Script

- #! /usr/bin/perl

- Defining a Variable value : Storing values to a Variable in form of string and number : $variable = "value";

- Output in Perl : If you want a string or a value to display on the screen then you can use the print command : print("value to be printed");

- Input in Perl : If you want a use input to be assigned to a variable use : $variable = ;


` Points to Remember

- A comments should start with a # symbol.

- Every statement in Perl ends with a semi-colon.

- Perl is case-sensitive.

- You can use any text editor to write your PERL scripts.

- Save the script file in .pl extension.

- Do not use spaces while naming the Perl script file.


` Steps to creating a Perl Script

1. Create a file using any editor like vi.

2. Name script file with extension .pl.

3. Start the script with #! /usr/bin/perl

4. Write some code.

5. Save the script file as filename.pl.

6. Run the script using bash filename.pl.



`` Summary
 
- Perl is a general-purpose programming language originally developed for text manipulation.

- Now used for a wide range of tasks including system administration, web development, network programming, GUI development, and more.

- Perl files have .pl extension.

- There are three types of variable in Perl-Scalar, Lists and Hashes.


Shell Scripting

** Shell Scripting


- Hardware - Kernel - Operating System - Shell - Terminal - User


` Types of Shell

- POSIX shell also known as sh

- Korn Shell also known as sh

- Bourne Again SHell also known as bash

- C shell also known as csh

- Tops C shell also known as tcsh


` What is shell scripting and why do I need it?

- Writing a series of commands

- Combine lengthy and repetitive commands

- This helps reduce the efforts


` Creating a Shell script

1. Create a file using a text editor like vi

2. Name script file with extension .sh

3. Start the script with #! /bin/sh

4. Write some code

5. Save the script file as filename.sh

6. For executing the script type bash filename.sh


` Adding shell comments

- # comment

` What are Shell Variables?

ex)
variable = "Hi"
echo $variable

Hi

ex)
#! /bin/sh
echo "What is your name?"
read name
echo "How do you do, $name?"
read remark
echo "I am $remark too!"



`` Summary

- Kernel is the nucleus of the operating systems and it communicates between hardware and software.

- Shell is a program which interprets user commands through CLI like Terminal.

- The Bourne shell and the C shell are the most used shells in Linux.

- Shell scripting is writing a series of command for the shell to execute.

- Shell variables store the value of a string or a number for the shell to read.

- Shell scripting can help you create complex programs containing conditional statements, loops and functions.


VI Editor

** VI Editor


`` VI Editor

` Why vi Editor?

- It is available in almost all Linux Distributions.

- It works the same across different platforms and Distributions.

- It is user friendly.


` Vim - Vi improved 


` Command Mode 

- Vi editor opens in this mode.

- Move the cursor and cut, copy, paste the text.

- Saves the changes to the file.

- Commands are case sensitive.



` Insert mode

- This mode is for inserting text in the file.

- Press 'i' on the keyboard for insert mode.

- In Insert mode, any key would be taken as an input.

- Press Esc key to save changes and return to command mode.


` Starting Vi Editor

- vi or vi

- ~ : denote unused lines


- i : Insert at cursor (goes into insert mode)

- a : Write after cursor (goes into insert mode)

- A : Write at the end of line (goes into insert mode)

- ESC : Terminate insert mode

- u : Undo last change

- U : Undo all changes to the entire line

- o : Open a new line (goes into insert mode)

- dd : Delete line

- 3dd : Delete 3 lines.

- D : Delete contents of line after the cursor

- C : Delete contents of line after the cursor and insert new text.

- dw : Delete word

- 4dw : Delete 4 words

- cw : Change word

- x : Delete character at cursor

- r : Replace character

- R : Overwrite characters from cursor onward

- s : Substitute one character under cursor continue to insert

- S : Substitute entire line and begin to insert at beginning of the line

- ~ : Change case of individual character


` Moving within a File

- Be in the command mode

- k : Move cursor up

- j : Move cursor down

- h : Move cursor left

- l : Move cursor right



` Saving or Closing the File

- Use only in Command Mode!

- Shift+zz : Save the file and quit

- :w : Save the file but keep it open

- :q : Quit without saving

- :wq : Save the file and quit



`` Summary

- The vi editor is the most popular and commonly used Linux text editor.

- It is usually available in all Linux Distributions.

- It works in two modes, Command and Insert.

- Command mode takes the user commands and the Insert mode is for editing text.

- You should know the commands in order to work on your file easily.

- Learning to use this editor can benefit you in creating scripts and editing files.



리눅스 통신

** 리눅스 통신


` PING


- ping

- Analyzing network and host connections

- Tracking network performance and managing it

- Testing hardware and software issues


` FTP

- FTP is File Transfer Protocol.

- ftp

- Logging in and establishing a connection with a remote host.

- Upload and download files.

- Navigating through directories.

- Browsing contents of the directories.


- dir : Display files in the current directory remote computer

- cd "dirname" : Change directory to "dirname" on remote computer

- put file : upload 'file' from local to remote computer

- get file : Download 'file' from remote to local computer

- quit : Logout



` Telnet

- telnet

- Connect to a remote Linux computer.

- Run programs remotely and conduct administration.

- Similar to the Remote Desktop found in Windows Machine.


` SSH


- SSH username@ip-address or hostname

- Securely connect to a remote computer

- Compared to Telnet, SSH is more secure


`` Summary

- Communication between Linux/UNIX and other different computers, networks and remote users is possible.

- The ping command checks whether the connection with a hostname or IP-address is working or not. Run 'ping IP address or Hostname' on the terminal.

- FTP is preferred protocol for sending and receiving large files. You can establish a FTP connection with a remote host and then use commands for uploading, downloading files, checking file and browsing them.

- Telnet utility helps you to connect to a remote Linux computer and work on it.

- SSH is a replacement for Telnet and is used by system administrators to control remote Linux servers.

---------------------------------------------------------------------



`` Environment Variables


` Platform = Operating System + Processor

` Variable ?

- Location for storing a value

- Referred to with its symbolic name

- The value stored can be displayed, deleted, edited and re-saved


` Environment Variables ?

- Dynamic values

- Exist in every operating system

- Can be created, edited, saved and deleted

- Gives information about the system behavior

- Change the way software/programs behave


- PATH : This variable contains a colon(:)-separated list of directories in which your system looks for executable files.

- USER : The username

- HOME : Default path to the user's home directory

- EDITOR : Path to the program which edits the content of files

- UID : User's unique ID

- TERM : Default terminal emulator

- SHELL : Shell being used by the user

- ENV : displays all the environment variables


` Accessing Variable values

- echo $VARIABLE


` Creating New Variables

- VARIABLENAME = variablevalue


` Deleting Variables

- unset


`` Summary

- Environment variables govern behavior of programs in your Operating system.

- echo $VARIABLE : To display value of a variable

- env : Displays all environment variables

- VARIABLE_NAME = variable_value : Create a new variable

- unset : Remove a variable

- export Variable = value : To set value of an environment variable

리눅스 환경설정 변수


** 리눅스 환경설정 변수


`` Environment Variables


` Platform = Operating System + Processor


` Variable ?

- Location for storing a value

- Referred to with its symbolic name

- The value stored can be displayed, deleted, edited and re-saved


` Environment Variables ?

- Dynamic values

- Exist in every operating system

- Can be created, edited, saved and deleted

- Gives information about the system behavior

- Change the way software/programs behave


- PATH : This variable contains a colon(:)-separated list of directories in which your system looks for executable files.

- USER : The username

- HOME : Default path to the user's home directory

- EDITOR : Path to the program which edits the content of files

- UID : User's unique ID

- TERM : Default terminal emulator

- SHELL : Shell being used by the user

- ENV : displays all the environment variables


` Accessing Variable values

- echo $VARIABLE


` Creating New Variables

- VARIABLENAME = variablevalue


` Deleting Variables

- unset <VARIABLENAME>


`` Summary

- Environment variables govern behavior of programs in your Operating system.

- echo $VARIABLE : To display value of a variable

- env : Displays all environment variables

- VARIABLE_NAME = variable_value : Create a new variable

- unset <VARIABLENAME> : Remove a variable

- export Variable = value : To set value of an environment variable


4/12/2020

File Permissions system in Linux

** File Permissions system in Linux


`` User

- Owner of the File

- User also called an Owner


`` Group

- User-group can contain multiple users.

- All users in the group have the same file permissions.


`` Other

- Any other user who has access to a file

- Does not own the file

- Does not belong to a Usergroup


--------------------------------------------------------


- r = read permission

- w = write permission

- x = execute permission

- - = no permission


--------------------------------------------------------

`` Changing file / directory permissions

- chmod permissions filename

- Stands for 'change mode'.

- Using the command, we can set permissions (read, write, execute) on a file/directory for the owner, group and the world.


`` Absolute(Numeric) Mode

- 0 : No Permission : ---

- 1 : Excute : --x

- 2 : Write : -w-

- 3 : Excute + Write : -wx

- 4 : Read : r--

- 5 : Read + Excute : r-x

- 6 : Read + Write : rw-

- 7 : Read + Write + Excute : rwx



`` Symbolic Mode


- + : Adds a permission to a file or directory.

- - : Removes the permission.

- = : Sets the permission and overrides the permissions set earlier.


- u : user/owner

- g : group

- o : other

- a : all


`` Changing Ownership and Group

- chown user

- chown user:group



`` Tips on Usergroups

- /etc/group

- Command 'groups'

- Command 'newgrp'


기초 리눅스 명령어

** 기초 리눅스 명령어


- pwd : Present Working Directory. Print Working Directory.


- cd : To change to a particular directory.

- cd .. : Move one directory level up.

- cd directory1/directory2 : Navigating through multiple directories.

- cd / : Move to the root directory.

- cd or cd ~ : Navigate to HOME directory. To return to home directory.


- ls : Lists all files and directories in the present working directory.

- ls -R : Lists files in sub-directories as well.

- ls -a : Lists hidden files as well. Hidden files start with '.' period symbol.

- ls -al : Lists files and directories with detailed information.


- cat : Display, Copy, Combine, Create text files.

- cat > filename : Creates a new file.

- cat filename : Displays the file content.

- cat file1 file2 > file3 : Joins two files(file1, file2) and stores the output in a new file(file3).


- mv file "new file path" : Moves the files to the new location.

- mv filename new_file_name : Renames the file to a new filename.


- sudo : Allows regular users to run programs as superuser or root.


- rm : Deletes a file.


- mkdir : Creates a new directory in the present working directory.

- mkdir : Create a new directory at the specified path.


- rmdir : Deletes a directory.


- mv : Renames a directory.


- man : Gives help information on a command.


- history : Gives a list of all past commands typed in the current terminal session.


- clear : Clears the terminal.

---------------------------------------------------------------------

`` pr Command : Printing on Linux


` Pr Command Options

- pr -x : Divides the data into 'x' columns

- pr -h "header" : Assigns "header" value as the report header

- pr -t : Does not print the header and top/bottom margins

- pr -d : Double spaces the output file

- pr -n : Denotes all line with numbers

- pr -l page length : Defines the lines (page length) in a page. Default is 56

- pr -o margin : Formats the page in accordance with the margin number



`` lp Filename or lpr Filename : Hard Copy

- Printing 'N' copies of file

- lp -nN Filename or lpr n Filename

- lp -dPrintername Filename or lpr -PPrintername Filename : Choosing Printers


---------------------------------------------------------------------


`` apt-get : Command used to install and update packages


- sudo apt-get install Softwarename : Installing Software


---------------------------------------------------------------------



`` Mailx address body : Command to send email

`` email address body : Command to send email



---------------------------------------------------------------------


`` Redirection in Linux

` Input / Output

- Standard Input (stdin) device is the keyboard.

- Standard Output (stdout) device is the Screen.


` Output Redirection

- The '>' symbol is used for output (stdout) redirection.

- Output Redirection >

- ">" is the output redirection operator. ">>" appends output to an existing file.


` Input redirection

- The '<' symbol is used for input (stdin) redirection.

- < Input Redirection

- ex) mail -s "News Today" abc@mail.com < NewsFlash


` Error Redirection

- Standard Input STDIN : FD0

- Standard Output STDOUT : FD1

- Standard Error STDERR : FD2



` Why Error Redirection?

- Searching for files typically gets permission denied errors.

- Error messages clutter up program output while executing shell scripts.

- Solution = Redirect error messages


` ls Documents ABC > dirlist 2>&1

- ">&" which writes the output from one file to the input of another file.

- Error output is redirected to standard output which in turn is being re-directed to file dirlist.

- ">&" re-directs output of one file to another.


---------------------------------------------------------------------


`` Pipes


- The symbol '|' denotes a pipe.

- Use Pipes to run two commands consecutively.

- Helps in creating powerful commands

ex) cat aaa.txt | less


` 'pg' and 'more' commands

- cat Filename | pg

- cat Filename | more



`` grep 

- Scan a document

- Present the result in a format you want

- grep

ex) cat aaa.txt | grep han



` The 'grep' command

- -v : Shows all the lines that do not match the searched string.

- -c : Displays only the count of matching lines.

- -n : Shows the matching line and its number.

- -i : Match both (upper and lower) case, all lines that match the character.

- -l : Shows just the name of the file with the string.



`` The 'sort' command

- Sorting the contents of a file

- sort Filename


` The 'sort' Option

- -r : Reverses sorting

- -n : Sorts numerically

- -f : Case insensitive sorting


` Pipes '|' help combine 2 or more commands.

` A filter in a pipe is an output of one command which serves as input to the next.

` The grep command can be used to find strings and values in a text document.

` 'sort' command sorts out the content of a file alphabetically.

` less, pg and more commands are used for dividing a long file into readable bits.


---------------------------------------------------------------------


`` Regular Expressions


` tr, sed, vi, grep

- . : replaces any character

- ^ : matches start of string

- $ : matches end of string

- * : matches up zero or more times the preceding character

- : Represent special characters

- () : Groups regular expressions

- ? : Matches up exactly one character


` Interval Regular Expressions

- Number of occurrences of a character in a string.

- {n} : Matches the preceding character appearing 'n' times exactly

- {n,m} : Matches the preceding character appearing 'n' times but not more than m

- {n,} : Matches the preceding character only when it appears 'n' times or more


` Extended regular Expressions

- \+ : Matches one or more occurrence of the previous character

- \? : Matches zero or one occurrence of the previous character


` Brace Expansion

- Sequence : {0..10}, {a..z}

- Comma Separated List : {aa, bb, cc, dd}


` Summary

- Regular expressions are a set of characters used to check patterns in strings.

- They are also called 'regexp' and 'regex'.

- It is important to learn regular expressions for writing scripts.


` Some basic regular expressions are:

- . : replaces any character

- ^ : matches start of string

- $ : matches end of string


` Some extended regular expressions are :

- \+ : Matches one or more occurrence of the previous character

- \? : Matches zero or one occurrence of the previous character


` Some interval regular expressions are :

- {n} : Matches the preceding character appearing 'n' times exactly

- {n,m} : Matches the preceding character appearing 'n' times but not more than m

- {n, } : Matches the preceding character only when it appears 'n' times or more

- The brace expansion is used to generate strings. It helps in creating multiple strings out of one.

---------------------------------------------------------------------

`` Managing Processes


` Process?

- An instance of a program is called a Process.

- Any command that you give to your Linux machine starts a new process.


` Types of Processes

- Foreground Processes

- Background Processes


` Background Process

1. Start the program

2. Press Ctrl + Z

3. Type bg to send process to background


` FG Command

- fg (jobname)



` Top

- Displays all the running processes.

- top

` process Status

- D : Uninterruptible sleep

- R : Running

- S : Sleeping

- T : Traced or Stopped

- Z : Zombie



` PS

- Process Status

- ps ux

- ps PID



` kill

- Terminates running processes

- kill PID

- niceness : -20 to 19 : Lower the niceness index, higher would be the priority


` NICE

- Default value of all the processes is 0

- nice -n 'Nice value' process name

- renice 'nice value' -p 'PID'


` DF

- Reports the free disk space

- df


` FREE

- Shows free and used memory (RAM) on the Linux system

- free -m

- free -g


`` Summary

- Any running program or a command given to a Linux system is called a process.

- A process could run in foreground or background.

- The priority index of a process is called Nice in Linux. Its default value is 0 and it can vary between 20 to -19.

- The lower the Niceness index the higher would be priority given to that task.

- bg : To send a process to background

- fg : To run a stopped process in foreground

- top : Details on all Active Processes

- ps : Give the status of processes running for a user

- ps PID : Gives the status of a particular process

- pidof : Gives the Process ID(PID) of a process

- kill PID : kills a process

- nice : Starts a process with a given priority

- renice : Changes priority of an already running process

- df : Gives free hard disk space on your system

- free : Tells the free RAM on your system


---------------------------------------------------------------------