Note - Summary note collection of Linux
An operating system based on the Linux kernel is called a Distribution or Distro
Unix/Linux uses a tree like hierarchical file system and there is no drivers in Linux ,unlike Windows. Linux file naming convention is case sensitive. Peripherals like hard drives, cd rom, printers are also considered files in Linux/ Unix. There are three user account types
1.Regular
2.Root - the super user and has all the administrative privileges.
3.Service Account
Absolute path is complete address of a file or directory. Relative path is relative location of a file of directory with respect to current directory.
Linux being a multi-user system uses permission and ownerships for security. there are three user types on a Linux system.
1. User
2. Group
3. Other
Linux divides the file permissions into read, write and execute denoted by r,w and x. The permissions on the files can be changed by 'chmod' command which can be further divide into Absolute and Symbolic mode. The 'chown' command can change the ownership of a file/directory using 'chown user file or chown user:group file'. The 'chgrg' command can change the group ownership 'chgrg group filename'
When sending mails "mail -s 'subject' -c 'cc-address' -b 'bcc-address' 'to-address' " is the command to send the mail. and " mail -s "subject" to-address<filename" is the command to send a mail with an attachment.
Redirection
1.Each file in the Linux has a corresponding File Descriptor associated with it.
2.The keyboard is the standard input device while your screen is the standard output device.
3.">" is the output redirection operator and ">>" appends output to an existing file.
4."<" is the input redirection operator.
5.">&" re-directs output of one file to another.
6.The errors can be redirected using its corresponding File Descriptor 2.
- Standard input STDIN - FD0
- Standard output STDOUT - FD1
- Standard Error STDERR - FD2
Pipe, Grep and sort command
1.Pipes '|' help combine 2 or more commands
2.The 'grep' command can be used to find strings and values of in a text document.
-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
-l show just the name of the file with the string
3.'sort' command sort out the content of a file alphabetically
-r reverse sorting
-n sort numerically
-f case insensitive sorting
4.less,pg and more commands are used for dividing the long file into a readable bits
Environment variables
Environment variables govern the behavior of in the operating system.
PATH - the variables contains a colon (:)- separated list of directories in which the system looks for executable files.
USER - The user name
HOME - Default path to the user's home directory
EDITOR - path to the program which edits the content of the files
UID - user's unique ID
TERM - Default terminal emulator
SHELL - shell being used by the user
and also when working on terminal following commands are used to do the operations on environment variables.
echo $VARIABLE - To display value of a variable
env - Displays all the environment variables
VARIABLE_NAME=variable-value - Create a new variable
unset - remove a variable
export Variable=value - To set vale of an environment variable
ping, this utility is commonly used to check whether the connection to the server is healthy or not.and this command is use in
1.Analyze the network and host connections.
2. Tracking network performance and managing it.
3.Testing hardware and software issues.
FTP is file transfer protocol and it's the most preferred protocol for data transfer. and FTP is used to
1.Logging in and establishing a connection with a remote host
2.Upload and download files
3.Navigating through directories
4.Browsing contents of a directories
Telnet helps to
1.Connect to a remote Linux computer
2.Run programs remotely and conduct administration
Process is an instance of a program.
1.Foreground process - run on the screen and need a user input
2.Background process - run on background and no need of user inputs.ex - antivirus.
Commands
bg- send a process to the backgound
fg - can use to continue a program which was stopped and bring it to the foreground
top - tells the user about all the running programs on the Linux machine
kill PID- terminates a running process on a Linux machine
nice - to avoid the poor performance by prioritizing the processes due to multiple processes at the same time on the machine.
renice - Change the priority of an already running process.
ps - Give the status of process running for a user.
ps PID - Gives the status of a particular process.
pidof - Gives the process ID of a process.
df - Gives free hard disk space on the system
free - Gives free RAM on the sysem
Unix/Linux uses a tree like hierarchical file system and there is no drivers in Linux ,unlike Windows. Linux file naming convention is case sensitive. Peripherals like hard drives, cd rom, printers are also considered files in Linux/ Unix. There are three user account types
1.Regular
2.Root - the super user and has all the administrative privileges.
3.Service Account
Absolute path is complete address of a file or directory. Relative path is relative location of a file of directory with respect to current directory.
Linux being a multi-user system uses permission and ownerships for security. there are three user types on a Linux system.
1. User
2. Group
3. Other
Linux divides the file permissions into read, write and execute denoted by r,w and x. The permissions on the files can be changed by 'chmod' command which can be further divide into Absolute and Symbolic mode. The 'chown' command can change the ownership of a file/directory using 'chown user file or chown user:group file'. The 'chgrg' command can change the group ownership 'chgrg group filename'
When sending mails "mail -s 'subject' -c 'cc-address' -b 'bcc-address' 'to-address' " is the command to send the mail. and " mail -s "subject" to-address<filename" is the command to send a mail with an attachment.
Redirection
1.Each file in the Linux has a corresponding File Descriptor associated with it.
2.The keyboard is the standard input device while your screen is the standard output device.
3.">" is the output redirection operator and ">>" appends output to an existing file.
4."<" is the input redirection operator.
5.">&" re-directs output of one file to another.
6.The errors can be redirected using its corresponding File Descriptor 2.
- Standard input STDIN - FD0
- Standard output STDOUT - FD1
- Standard Error STDERR - FD2
Pipe, Grep and sort command
1.Pipes '|' help combine 2 or more commands
2.The 'grep' command can be used to find strings and values of in a text document.
-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
-l show just the name of the file with the string
3.'sort' command sort out the content of a file alphabetically
-r reverse sorting
-n sort numerically
-f case insensitive sorting
4.less,pg and more commands are used for dividing the long file into a readable bits
Environment variables
Environment variables govern the behavior of in the operating system.
PATH - the variables contains a colon (:)- separated list of directories in which the system looks for executable files.
USER - The user name
HOME - Default path to the user's home directory
EDITOR - path to the program which edits the content of the files
UID - user's unique ID
TERM - Default terminal emulator
SHELL - shell being used by the user
and also when working on terminal following commands are used to do the operations on environment variables.
echo $VARIABLE - To display value of a variable
env - Displays all the environment variables
VARIABLE_NAME=variable-value - Create a new variable
unset - remove a variable
export Variable=value - To set vale of an environment variable
ping, this utility is commonly used to check whether the connection to the server is healthy or not.and this command is use in
1.Analyze the network and host connections.
2. Tracking network performance and managing it.
3.Testing hardware and software issues.
FTP is file transfer protocol and it's the most preferred protocol for data transfer. and FTP is used to
1.Logging in and establishing a connection with a remote host
2.Upload and download files
3.Navigating through directories
4.Browsing contents of a directories
Telnet helps to
1.Connect to a remote Linux computer
2.Run programs remotely and conduct administration
Process is an instance of a program.
1.Foreground process - run on the screen and need a user input
2.Background process - run on background and no need of user inputs.ex - antivirus.
Commands
bg- send a process to the backgound
fg - can use to continue a program which was stopped and bring it to the foreground
top - tells the user about all the running programs on the Linux machine
kill PID- terminates a running process on a Linux machine
nice - to avoid the poor performance by prioritizing the processes due to multiple processes at the same time on the machine.
renice - Change the priority of an already running process.
ps - Give the status of process running for a user.
ps PID - Gives the status of a particular process.
pidof - Gives the process ID of a process.
df - Gives free hard disk space on the system
free - Gives free RAM on the sysem
Comments
Post a Comment