Docsity

Linux Operating System: Features, Commands, and Usage, Summaries of Linux skills

Toggle sidebar
bg1
Linux operating system which was developed through a cooperation of numerous people around the
world is free and accessible by everyone in the world(open-source).
What is good about linux
Linux has a rich collection of applications which are free and commercial as well as a lare variety of
tools ,graphical ,word processing ,networking ,security and administration
Another aspect of l is its appeal to users is the amazing range of peripheral that is supported and the
speed is at which the ….
Is also important to users Is the amount of software that is available, not just source code but also
rebuilt binaries that are easy to install and easy to run.
Linux supports programs called ….that run code intended for other systems
A virtual machine appears to the user and the software running it as a completely physical machine.
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Linux Operating System: Features, Commands, and Usage and more Summaries Linux skills in PDF only on Docsity!

Linux operating system which was developed through a cooperation of numerous people around the world is free and accessible by everyone in the world(open-source). What is good about linux Linux has a rich collection of applications which are free and commercial as well as a lare variety of tools ,graphical ,word processing ,networking ,security and administration Another aspect of l is its appeal to users is the amazing range of peripheral that is supported and the speed is at which the …. Is also important to users Is the amount of software that is available, not just source code but also rebuilt binaries that are easy to install and easy to run. Linux supports programs called ….that run code intended for other systems A virtual machine appears to the user and the software running it as a completely physical machine.

The Slash is followed by the name of the file located in the file directory. An Absolute path name can continue tracing a path through all intermediate intermediatory to the file identified by the path name. Relative path name traces a path a from the working directory to a file. The path is relative to the working directory ,any path name that does not begin with the root directory is a relative path name. 777 711 Owner can read,write and execute files.Groups and others can execute files 644 Owner can read and write file ,Group and others can read file. 640 Owner can read and write file.Group can read file,Others cannot access file. R - w- 2 x – 1 LINUX COMMANDS Mkdir – Create new directory Touch file_name – Creates a file Cd – change to directory Cat – displays the contents of a file Creates and text to the file Ls – lists files Head – Displays the first 10 lines of a file Tail – Displays the last 10 lines of a file Tac- Dsplays the files content in reverse More – Displays Large Content Id – displays the user id of the User Ls – la Grep – filer to search a given paatern in a file e.g grep Linux file1.txt – searches the name Linux in the file1.txt Ping – diplays the network connectivity History – Displays the history of the commands inserted before Hostname –

Example 3 Touch temp Set -o noclobber – used to prevent accidental overwriting of files Echo “Hii There”>temp Example 4 Vi orange This is an orange Vi pear This is a pear Cat orange Cat pear >>orange - adds content of file pear to file orange Cat orange Example 5 Vi whoson Date Echo “Users currently Logged in” W :wq Cat whoson ./whoson Ls -l whoson Drw- Chmod 777 whoson Ls -l whoseon Drw- ./whoseon SCRIPTS Example vi bash_script #!bin/bash Echo”This is a bash script” :wq Cat bash_script ./bash_script Vi perl-script- Pl #!/bin/perl -w Print(this is a perl script) Vi tcsh_script #!/bin/tcsh Echo”this is a tcsh script” Set person =zach

1. Echo”person is $person”

#!/bin/tesh : This is called the shebang line, which specifies the path

to the interpreter that will execute the script. In this case, it points to

/bin/tesh , indicating that this script is intended to be executed using

the tcsh shell.

2. Echo "this is a tcsh script" : This line simply prints the text "this is a

tcsh script" to the standard output.

3. Set person = zach : This line declares a variable named person and

assigns the value "zach" to it. In tcsh, the set command is used to

assign values to variables.

4. Echo "person is $person" : This line prints the text "person is "

followed by the value of the person variable. In tcsh, variable values

are accessed using the $ prefix.

So, when you execute this script, it will print the specified messages to the

standard output, indicating that it's a tcsh script and displaying the value of

the person variable as "zach". However, it's worth noting that there's a typo

in the shebang line ( #!/bin/tesh ), as it should likely be #!/bin/tcsh instead of

#!/bin/tesh , assuming that tcsh is the correct shell interpreter

df Command:

The df or disk-free command shows the used and the available

disk space. You can use the additional options to check disk space

differently. For instance, you can use the df -h command to check

the disk usage in the human-readable format.

Ps – f – lists all the users … true|| false && false echo $? – 1 false && false || true echo $? – 0 (true||false) && false echo $? – 1 false && (false || true) echo $? – 1 person=max echo person echo $person person=”Max and Zach”

x= local y= echo “demo:&x &y “ echo {4..8} echo {8..16..2} echo {a..m..3} seq 4 8 seq -sl 8 16 2 vi age-check read – p”How old are you” age echo “Wow in $((100-age)),you will be 100 years “ :wq Cat age-check ./age-check It seems you've provided a mix of commands, expressions, and function definitions in your question. Let's categorize and explain them:

Commands:

  1. ps -f: This command lists all processes in a full-format listing.
  2. echo $?: This command prints the exit status of the last executed command. $? holds the exit status of the most recently executed foreground pipeline.
  3. locale: This command displays information about the current locale settings.
  4. locale -av: This command lists all available locales.
  5. pstree -p: This command displays a tree diagram of running processes.
  1. history: This command displays a list of previously executed commands.
  2. hash -r: This command resets the command hash table.
  3. fc -l: This command lists previously executed commands.

Shell Expressions:

  1. true || false && false: This expression evaluates to true because the first condition (true) is true. The && operator will only evaluate the second expression if the first one is true, but it doesn't matter because the result is already determined.
  2. false && false || true: This expression evaluates to true because the last condition (true) is true. The && operator short-circuits when the first expression is false, so the second expression isn't evaluated.
  3. (true || false) && false: This expression evaluates to false because the last condition (false) is false.
  4. false && (false || true): This expression evaluates to false because the last condition (false || true) is true, but the first condition (false) is false.

Variable Manipulations:

  1. person=max: This assigns the string "max" to the variable person.
  2. person="Max and Zach": This assigns the string "Max and Zach" to the variable person.

Functions:

  1. say_hii () { echo "hii"; }: Defines a function named say_hii that echoes "hii".