UNDERSTANDING AND KINDS OF SHELLS AND COMMANDS COMMANDS IN SHELL

  • Whatsapp

1. Understanding SHELL!
2. Mention and explain the types of SHELL!
3. Explain the use of PS, Clear, ECHO, Parameters, Chmod 755!
4. Mention the types of commands / commands that are common to SHELL! Explain and give an example of at least 20!

Answer

1. Shell, in a computer is one type of program built-in operating system (often a separate program from the core operating system) that provides direct communication between users and the operating system. Shell examples are COMMAND.COM in MS-DOS, Macintosh Finder (Macintosh), Windows Explorer, Command Prompt / cmd.exe, PowerShell in Microsoft Windows, Bourne shell, C shell, Korn shell and many others especially in the family of operating systems UNIX.
Shell is a command translator program that is bridged by users with the operating system. In general, the shell provides a prompt as a user interface, the place where the user types in the desired commands, either an internal shell command or an external shell command to execute a program file. Besides that, the shell allows the user to compile a set of commands on a file or several files using a text editor, to be executed like a program.

2. a.Bourne Shell (sh)
sh is a standard Unix shell made in 1979 by Stephen Bourne of AT & T using the Algol programming language. sh is famous for being simple, compact, and fast. The disadvantages are less interactive such as no history, aliasing, and job control. The default prompt shell sh is $ (dollars).
b. C Shell (csh)
csh has a more complete feature than sh. This Shel was made in the 1970s by Bill Joy from the University of California at Berkeley using C language.
Features contained in the CSH include command-line history, aliasing, built-in arithmetic, filename completion, and job control. The disadvantage is that because it is designed for large scale machines and has many features, this shelter tends to be slow when used on small machines. The default shell prompt csh is% (percent).
c. Korn Shell (ksh)
Korn shell is a development of bourne shell written by David Korn from AT & T in the mid 1980s. Korn shell features include editable history, aliases, functions, regular expression wildcards, built-in arithmetic, job control, coprocessing, and special debugging. The default shell prompt is $ (dollars).
d. Bourne Again Shell (bash)
Bash is the default Linux shell which is a development of bourne shell so it is also compatible with Unix. This shell was made in 1988 by Brian Fox of the GNU FSF. The features possessed by bash include interactive, can create shortcuts, can be colored, etc. The default Bash prompt is $ (dollars).

Baca Juga:  6 Cara Merawat Keyboard Laptop agar Awet

3. PS, this command is used to see every process that is executed in the machine along with the process number.
ECHO is a built-in bash statement (command) that functions to display information to the standard output whose default is the screen.
Clear, to clear the screen of all commands
Parameters, to input a result that displays horizontally
Chmod 755, to allow a command to be executed.

4. paint
This cat command displays the contents of a file to standard output (stdout)
Syntax:
$ paint
Example:
antoro @ drutz: ~ $ cat test
this is only a test of output redirection
Paint can also be used to insert a content from a file into another file.
Syntax:
$ cat file1 file2 file3> file4
clear
This clear command is similar to cls in DOS, which is used to clean the screen
Syntax:
$ clear
cp
Similar to the copy in DOS, this cp command functions to copy files.
Syntax:
$ cp [option] file / dir / path /
cut
The cut command defines a file that contains data based on a column
Syntax:
$ cut [option] file
Example: we will cut the test file from columns 1-7
antoro @ drutz: ~ $ cut -c 1-7 test
this is han
heheheh
line i
antoro @ drutz: ~ $ cat test
this is only a test of output redirection
hehehehehe …
This line is additional than the old one …
antoro @ drutz: ~ $
From the example it can be seen that the cut only shows the contents of the test file from columns 1 – 7
find
From the name it can be guessed that this command works to find files or directories.
Syntax:
$ find / path [option]
Example:
antoro @ drutz: ~ $ find. -name te *
./test
antoro @ drutz: ~ $
grep
This command is useful for searching data in files, using grep will be more efficient than time
must read one by one
Syntax:
$ grep [option] “data” file
Example:
antoro @ drutz: ~ $ grep “this” test
this is only a test of output redirection
This line is additional than the old one …
antoro @ drutz: ~ $
ln
The use of this command is to create links from one file / directory to another file / directory
Syntax:
$ ln -s / path / to / source target
Example:
antoro @ drutz: ~ $ ln -s test
antoro @ drutz: ~ $ ls -l
total 2
-rw-r-r– 1 antoro antoro 102 Nov 9 14:11 test
lrwxrwxrwx 1 antoro antoro 4 Nov 10 3:21 test -> test
antoro @ drutz: ~ $
From the example it can be seen that the test file is a link from the test file
locate
This command is used to find out where a file or directory is located. Its function is more or less the same as find, the difference between locate uses a database (usually located in / var / lib / locatedb) which can be updated using the updatedb command.
Syntax:
$ locate
Example:
antoro @ drutz: ~ $ locate test
/ home / antoro / test
antoro @ drutz: ~ $
ls it
This command is the same as dir in DOS, which functions to display the contents of a directory along with its attribute attributes.
Syntax:
$ ls [option] / directory
Example:
antoro @ drutz: ~ $ ls / home / antoro
test test
antoro @ drutz: ~ $
mkdir
The mkdir command is equivalent to md (make directory) on DOS which is useful for creating a directory.
Syntax:
$ mkdir
mv
This command is similar to the move command on DOS which is useful for moving files from one directory to another directory, or can also be used instead of file names (ren / rename in DOS)
Syntax:
$ mv file1 file2
rm and rmdir
The rm command is a command to delete files. For directories you can use the directory
Syntax:
$ rm
$ rmdir
tail
This command is the opposite of the cut command, tail defines a data on the file according to its line. A little difference is that in the tail, the last 10 lines are displayed from the contents of the file
Syntax:
$ tail [option]
Example:
antoro @ drutz: ~ $ tail test
this is only a test of output redirection
hehehehehe …
This line is additional than the old one …
antoro @ drutz: ~ $
If we want to display only the last 2 lines, use the option [- [value]. For example:
antoro @ drutz: ~ $ tail -2 test
hehehehehe …
This line is additional than the old one …
antoro @ drutz: ~ $
mount
Each device in linux so that it can be accessed must first be mounted or linked.
Syntax:
$ mount [option] / dev / / path / to / mountdir
Example:
$ mount / dev / hda1 / mnt / disk
ps
This command is used to see every process that is executed in the machine along with the process number.
Syntax:
$ ps [option]
kill
The kill (deadly) command as the name suggests is to send signals to a process. So that it can order whether a process is postponed, stopped or continued. But it is most often used to turn off the current process.
Syntax:
$ kill
adduser, passwd and userdel
The adduser and userdel commands are files for user administration. adduser is used to add users to a machine. Then after adding the new user password is added with the passwd command. While the userdel is used to delete users on the machine. To execute these commands, a priviledge root is required.
Syntax:
# adduser
# passwd
# userdel [-r]

Pos terkait

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *