sonyps4.com

History of emergence and UNIX standards. Linux Basics - Command Line and Filesystem Combining Filesystems

UNIX(Unix, Unix) - a group of portable, multitasking and multiuser operating systems. The first Unix operating system was developed in the late 1960s and early 1970s by the American research firm Bell Laboratories. Initially, it was focused on minicomputers, and then began to be used on computers of all classes, including mainframes and microcomputers. This was facilitated by the adaptation of Unix to Intel's 32-bit microprocessors, which was implemented in 1990. The functionality and flexibility of Unix has ensured its use in heterogeneous automated systems, as well as the creation of dozens of standards for computer manufacturers. Operating systems of the Unix family:

Linux is a version of the Unix operating system for computing platforms based on Intel processors;
HP-UX - Hewlett-Packard's version; is constantly evolving and is compatible with IE-64, which is the new standard for 64-bit architecture;
SGI Irix is ​​a Silicon Graphics PC operating system based on System V Release 3.2 with BSD elements. On this version of Unix, Industrial Light & Magic created the films Terminator 2, Jurassic Park.
SCO Unix - version of Santa Cruz Operation for the Intel platform, independent of hardware manufacturers;
IBM AIX - based on System V Release 2 with some BSD extensions;
DEC Unix is ​​an operating system with support for clusters; focused on collaboration with Windows NT;
NeXTStep-4.3 BSD - OS implemented on the basis of the Mach kernel, used in NeXT computers; owned by Apple Computer and serves as the operating system for Macintosh computers;
Sun Solaris is an operating system for SPARC stations based on System V Release 4 with numerous additions.

The Unix operating system appeared during the development of minicomputers. In 1969, research firm Bell Labs began developing a compact operating system for Digital Equipment Corporation's 18-bit DEC PDP-7 minicomputer. Initially, the system was written in assembly language and the date of birth of Unix is ​​January 1, 1970. In 1973, it was rewritten in C, which was developed at Bell Labs. Then the official presentation of the operating system took place. Its authors - employees of Bell Labs Ken Thompson (Ken Tompson) and Dennis Ritchie (Dennis M. Ritchie) - called their offspring "universal operating system with time sharing (time-sharing)".

Unix is ​​based on a hierarchical file system. Each process was considered as a sequential execution of program code within an autonomous address space, and work with devices was treated as work with files. In the first version, the key concept of a process was implemented, later system calls appeared (fork, wait, exec, exit). In 1972, through the introduction of pipes (pipes), data pipeline processing was provided.

By the end of the 1970s, Unix had become a popular operating system, aided by its favorable distribution in the university environment. Unix was ported to many hardware platforms, and variations began to appear. Over time, Unix has become the standard not only for professional workstations, but also for large enterprise systems. The reliability and flexibility of UNIX settings have made it popular, especially among system administrators. She played an active role in the spread of global networks, and, above all, the Internet.

Thanks to the source disclosure policy, numerous free Unix dialects running on the Intel x86 platform (Linux, FreeBSD, NetBSD, OpenBSD) have spread. Full control over the texts made it possible to create systems with special performance and security requirements. Unix also assimilated elements of other operating systems, resulting in the POSIX programming interfaces, X/Open.

There are two independently developed branches of UNIX, System V and Berkeley, from which Unix dialects and Unix-like systems are formed. BSD 1.0, which became the basis for non-commercial UNIX dialects, was released in 1977 at the University of California, Berkeley, based on the UNIX V6 source code. In 1982-1983, the first commercial dialects of Unix, System III and System V, were released by Unix System Laboratories (USL). The Unix System V version formed the basis of most subsequent commercial variants. In 1993, AT&T sold the rights to Unix, along with the USL laboratory, to Novell, which developed the Santa Cruz Operation's UNKWare dialect called SCO UNIXWare based on System V. The Unix trademark is owned by the X/Open Company.

Unix has gained popularity due to the ability to work on different hardware platforms - portability (portability), or mobility. The problem of mobility in UNIX was solved by unifying the architecture of the operating system and using a single language environment. Developed at Bell Labs, the C language became the link between the hardware platform and the operating environment.

Many Unix portability issues have been resolved with a single programming and user interface. The problem of negotiating multiple Unix dialects is being tackled by two organizations: the IEEE Portable Applications Standards Committee (PASC) and the X/Open Company (The Open Group). These organizations develop standards that enable the integration of heterogeneous operating systems, including those not related to Unix (IEEE PASC - POSIX 1003, X / Open - Common API). So, POSIX-compliant systems are Open-VMS, Windows NT, OS/2.

Unix's portability, as a system oriented to a wide range of hardware platforms, is based on a modular structure with a central core. Initially, the UNIX kernel contained a set of tools responsible for process scheduling, memory allocation, file system management, support for external device drivers, networking, and security tools.

Later, by isolating the minimum required set of tools from the traditional kernel, a microkernel was formed. The most famous Unix microkernel implementations are Amoeba, Chorus (Sun Microsystems), QNX (QNX Software Systems). The Chorus microkernel is 60 KB, QNX is 8 KB. Based on QNX, a 30 KB POSIX-compliant Neutrino microkernel has been developed. The Mach microkernel was developed at Carnegie Mellon University in 1985 and used in NeXT OS (NeXT), MachTen (Mac), OS/2, AIX (for IBM RS/6000), OSF/1, Digital UNIX (for Alpha), Windows NT, BeOS.

In Russia, the Unix operating system is used as a network technology and operating environment for various computer platforms. The infrastructure of the Russian Internet was formed on the basis of Unix. Since the beginning of the 1980s, domestic work on the Unix operating system has been carried out at the Institute of Atomic Energy. I. V. Kurchatov (KIAE) and the Institute of Applied Cybernetics of the Minavtoprom. The result of the merger of these teams was the birth of the DEMOS operating system (Dialogue Unified Mobile Operating System), which, in addition to domestic analogues PDP-11 (CM-4, CM-1420), was transferred to the ES computers and Elbrus. Despite its versatility, Unix lost the personal computer market to Microsoft's Windows family. The Unix operating system maintains its position in the field of mission-critical systems with a high degree of scalability and fault tolerance.

In 1965, Bell Telephone Laboratories (a division of AT&T), together with peneral jlectric qompang and the Massachusetts Institute of Technology (rIT), began developing a new operating system called rULTIqS (rULTipleoed Information and qomputing Service). The goal of the project participants was to create a multitasking time-sharing operating system capable of supporting the work of several hundred users. Two contributors from Bell Labs, Ken Thompson (ten Tompson) and Dennis Ritchie (Dennis uitchie) took part in the project. Although the rULTIqS system was never completed (Bell Labs withdrew from the project in 1969), it became the forerunner of the operating system that later became known as Unio.

However, Thompson, Ritchie and a number of other employees continued to work on creating a convenient programming system. Using the ideas and developments that emerged as a result of work on rULTIqS, they created a small operating system in 1969 that included a file system, a process management subsystem, and a small set of utilities. The system was written in assembler and used on the nDn-7 computer. This operating system was called UNIX, consonant with rULTIqS and coined by another member of the development team, Brian Kernigan (Brian ternigan).

Although the early version of UNIX had great promise, it could not have realized its full potential without being used in some real project. And such a project was found. When the Bell Labs patent department needed a word processing system in 1971, UNIX was chosen as the operating system. By that time, it had been transferred to the more powerful nDn-11, and it had grown a little: 16K was occupied by the system itself, 8K was allocated to application programs, the maximum file size was set to 64K with 512K of disk space.

Shortly after producing the first assembler versions, Thomson began working on a compiler for the FxuTuAN language, and as a result developed the B language. It was an interpreter with all the limitations of an interpreter, and Ritchie reworked it into another language called q, which allowed the generation of machine code. In 1973, the operating system kernel was rewritten in the high-level language C, a hitherto unheard-of move that had a huge impact on UNIX's popularity. This meant that a UNIX system could now be ported to other hardware platforms in a matter of months, with little difficulty in making changes. The number of running UNIX systems at Bell Labs exceeded 25, and the UNIX Sgstem proup (USp) group was formed to maintain UNIX.

Research Versions (AT&T Bell Labs)

In accordance with US federal law, AT&T did not have the right to commercially distribute UNIX and used it for its own needs, but starting in 1974, the operating system began to be transferred to universities for educational purposes.

The operating system was modernized, each new version was supplied with the corresponding edition of the Programmer's Guide, from which the versions themselves were called editions (jdition). A total of 10 editions were issued from 1971 to 1989. The most important editions are listed below.

Revision 1 (1971)

The first version of UNIX written in assembler for nDn-11. It included the B language and many well-known commands and utilities, including cat, chdir, chmod, cp, ed, find, mail, mkdir, mkfs, mount, mv, rm, rmdir, wc, who. Primarily used as a word processing tool for the Bell Labs patent department.

Revision 3 (1973)

The cc command appeared in the system, which launched the C compiler. The number of installed systems reached 16.

Revision 4 (1973)

The first system in which the kernel was written in the high-level language C.

Revision 6 (1975)

The first version of UNIX available outside of Bell Labs. The system was completely rewritten in C. Since that time, new versions not developed at Bell Labs began to appear and the popularity of UNIX began to grow. This version of the system was installed at the University of California at Berkeley, and the first version of BSD (Berheleg Softkare Distribution) UNIX was soon released on its basis.

Revision 7 (1979)

Includes the Bourne Shell shell and the C compiler from Kernighan and Ritchie. The kernel of the system has been rewritten for portability to other platforms. This version was licensed by ricrosoft, which developed the XjNIX operating system based on it.

The popularity of UNIX grew, and by 1977 the number of operating systems exceeded 500. In the same year, the system was first ported to a computer other than nDn.

Genealogy UNIX

There is no "standard" UNIX system, all UNIX-like systems have their own unique features and capabilities. But behind the different names and features, it's still easy to see the architecture, user interface, and UNIX programming environment. It is explained quite simply s all mti operating systems are close or distant relatives. The most prominent representatives of this family are described below.

System III (1982)

Not wanting to lose the initiative to develop UNIX, AT&T in 1982 combined several existing versions of the OS and created a version called Sgstem III.

This version was intended for distribution outside of Bell Labs and AT&T, and started a powerful branch of UNIX that is alive and well today.

System V (1983)

In 1983, System V was released, and later - several more releases (Release) to it:

  • SVR2 (1984): InterProcess Communication (IPC) shared memory, semaphores
  • SVR3 (1987): System I/O Streams, File System Switch, shared libraries
  • SVR4 (1989): NFS, FFS, BSD sockets. SVR4 combined the features of several well-known versions of UNIX - SunOS, BSD UNIX, and previous releases of System V.

Many components of this system have been supported by the ANSI, POSIX, X/Open, and SVID standards.

UNIX BSD (1978) (Based on the 6th edition of UNIX)

  • 1981 Tqn/In stack was built into BSD UNIX by order of DAunA (in 4.2BSD)
  • 1983 actively used network technologies and could connect to the ARPANET
  • 1986 version 4.3BSD released
  • 1993 4.4BSD and BSD Lite are released (latest versions released).

OSF/1 (1988) (Open Software Foundation)

In 1988, IBM, DEC, HP teamed up to create a version of UNIX independent of AT&T and SUN and created an organization called OSF. The result of the activities of this organization was the OSF / 1 operating system.

Standards

The more different variants of UNIX appeared, the more obvious the need to standardize the system became. The existence of standards facilitates application portability and protects both users and manufacturers. As a result, several organizations associated with standardization have emerged, and a number of standards have been developed that have an impact on the development of UNIX.

IEEE POSIX (Institute of Electrical and Electronics Engineers Portable Operating System Interface)

  • 1003.1 (1988) Standardization of API (Application Programming Interface) OC
  • 1003.2 (1992) definition of shell and utilities
  • 1003.1b (1993) Real-time application APIs
  • 1003.1c (1995) definitions of "threads" (threads)

ANSI (American National Standards Institute)

  • Standard X3.159 (1989)
  • Syntax and semantics of the C language
  • Contents of the standard libc library

X/Open

  • 1992 xwindow standard
  • 1996 creation together with OSF of the CDE (Common Desktop Environment) user interface and its interface with the Motiff graphical shell

SVID (System V Interface Definition)

Describes the external interfaces of UNIX versions of System V. In addition to SVID, SVVS (System V Verification Suite) was released - a set of text programs that allows you to determine whether the system meets the SVID standard and is worthy of bearing the proud name of System V.

Notable versions of UNIX

  • IBM AIX based on SVR2 with many features of SVR4, BSD, OSF/1
  • HP-UX version of HP
  • IRIX version by Silicon Graphics, similar to SVR4
  • Digital UNIX version of DEC based on OSF/1
  • SCO UNIX (1988) one of the first UNIX systems for PC based on SVR3.2
  • Solaris version of Sun Microsystems' UNIX SVR4

Linux Basics

Linux is inspired by the Unix operating system, which appeared in 1969 and is still used and developed today. Much of the internals of UNIX exists on Linux as well, which is key to understanding the underlying system.

Unix focused primarily on the command line interface, the same inherited Linux. Thus, the graphical user interface with its windows, images and menus is built on top of the main interface - the command line. It also means that the Linux file system is built to be easily manageable and accessible from the command line.

Directories and the file system

File systems in Linux and Unix are organized in a hierarchical, tree-like structure. Top filesystem level - / or root directory . This means that all other files and directories (including also other drives and partitions) are inside the root directory. In UNIX and Linux, everything is considered a file - including hard drives, their partitions, and removable media.

For example, /home/jebediah/cheeses.odt shows the full path to cheeses.odt . The file is in the jebediah directory, which is in the home directory, which in turn is in the root directory (/).

Within the root directory (/) there are a number of important system directories that are present in most Linux distributions. The following is a list of shared directories that are directly under the root directory (/):

Access rights

All files in Linux have permissions that allow or deny to read, modify or execute them. The super user "root" has access to any file on the system.

Each file has the following three access sets, in order of importance:

    owner

    refers to the user who owns the file

    group

    refers to the group associated with the file

    others

    applies to all other users of the system

Each of the three sets defines access rights. The rights, as well as how they apply to various files and directories, are given below:

    reading

    files can be displayed and opened for reading

    contents of directories are available for viewing

    record

    files can be changed or deleted

    the contents of the catalogs are available for changes

    performance

    executable files can be run as programs

    directories can be opened

To view and edit the permissions on files and directories, open the Applications → Accessories → Home Folder and right-click on a file or directory. Then select Properties . The permissions exist under the Permissions tab and allow for the editing of all permission levels, if you are the owner of the file.

To learn more about file permissions in Linux, read the file permissions page in the Ubuntu Wiki.

Terminals

Working at the command line is not as daunting a task as you would think. There is no special knowledge needed to know how to use the command line. It is a program like everything else. Most things in Linux can be done using the command line, although there are graphical tools for most programs. Sometimes they are just not enough. This is where the command line comes in handy.

The Terminal is located in Applications → Terminal . The terminal is often called the command prompt or the shell. In days gone by, this was the way the user interacted with the computer. However, Linux users have found that the use of the shell can be quicker than a graphical method and still holds some merit today. Here you will learn how to use the terminal.

The terminal was originally used to manage files, and indeed it is still used as a file browser if the graphical environment is not working. You can use the terminal as a browser to manage files and undo changes that have been made.

Basic commands

View directory contents: ls

Team ls shows a list of files in different colors with full text formatting

Create directories: mkdir (directory name)

Team mkdir creates a new directory.

Go to directory: cd (/address/directory)

Team cd allows you to change to any directory you specify.

Copy a file or directory: cp (what is the name of the file or directory) (where is the name of the directory or file)

Team cp copies any selected file. Team cp-r copies any selected directory with all its contents.

Remove files or directories: rm (file or folder name)

Team rm deletes any selected file. Team rm-rf deletes any selected directory with all contents.

Rename file or directory: mv (name of file or directory)

Team mv renames or moves the selected file or directory.

Finding directories and files: locate (directory or file name)

Team locate allows you to find the specified file on your computer. File indexing is used to speed up work. To update the index, enter the command updatedb. It runs automatically every day when the computer is turned on. Superuser rights are required to run this command (see "The root user and the sudo command").

You can also use wildcards to specify more than one file, such as "*" (match all characters) or "?" (match one character).

For a more thorough introduction to the Linux command line, please read the command line introduction on the Ubuntu wiki.

Text editing

All of the configurations and settings in Linux are saved in text files. Even though you most often can edit configurations through the graphical interface, you may occasionally have to edit them by hand. mousepad is the default Xubuntu text editor, which you can launch by clicking Applications → Accessories → Mousepad on the desktop menu system.

Sometimes, mousepad run from the command line using the application gksudo, which launches mousepad with administrative privileges, allowing configuration files to be modified.

If you need a text editor on the command line, you can use nano- easy to use text editor. When running from the command line, always use the following command to disable automatic word wrap:

Nano-w

For more information about how to use nano, refer to the guide on the wiki .

There are also quite a few other terminal-based editors available in Ubuntu. Popular ones include VIM and emacs(the pros and cons of each are cause for much friendly debate within the Linux community). These are often more complex to use than nano, but are also more powerful.

root user and sudo command

The root user in GNU/Linux is the user which has administrative access to your system. Normal users do not have this access for security reasons. However, Ubuntu does not enable the root user. Instead, administrative access is given to individual users, who may use the "sudo" application to perform administrative tasks. The first user account you created on your system during installation will, by default, have access to sudo. You can restrict and enable sudo access to users with the Users and Groups application (see Managing Users and Groups for more information).

When you open a program that requires super user rights, sudo will prompt you for your password. This ensures that malicious applications cannot damage your system and also reminds you that you are about to perform actions that require extra care!

To use sudo on the command line, simply type "sudo" before the command you want to run. After that, you will be asked to enter your password.

Sudo will remember your password for 15 minutes (by default). This feature was designed to allow users to perform multiple administrative tasks without being asked for a password each time.

Be careful when doing administrative tasks - you might damage your system!

Some other tips for using sudo include:

    To use the terminal as super user (root), type "sudo -i" at the command line

    The entire suite of default graphical configuration tools in Ubuntu already use sudo, so they will prompt you for your password if needed.

    When running graphical applications, "sudo" is replaced by "gksudo". This allows you to prompt the user for a password in a small graphics window. The "gksudo" command is handy if you want to set a start button Synaptic to your panel or something similar.

    For more information on the sudo program and the absence of a root user in Ubuntu, read the sudo page on the Ubuntu wiki.

transcript

1 Introduction The course "Fundamentals of UNIX OS" is intended for students of initial courses of faculties interested in training software developers of one level or another. Mandatory prerequisite for UNIX is an introductory course in C programming as a basic course, as well as a course in the basics of computer architecture. The structure of the course offers 13 lectures and related labs to help you understand the general principles of functioning of a UNIX-type operating system. Lecture material is presented in abstract form, which leaves a large degree of freedom for the depth of presentation of topics in the lecture material. In addition, the duration of some lectures can vary from 2 to 6 hours, if necessary. Laboratory classes do not involve the use of a specialized laboratory or a specific UNIX / Linux clone and can be performed on student personal computers using any available UNIX, Solaris, Linux, FreeBSD, Mac OS X, etc. software, provided that the appropriate packages are installed from the depositories for developers. In practice, usually, remote access to a Linux server was used via the SSH protocol, for Windows workstations and PuTTY 1 - as an SSH client. Finally, note that all tasks are performed in the shell (bash) command interpreter and various existing X Window (X11) interfaces (CDE, GNOME, KDE, Xfwm, Xfce or wmii, etc.) are not discussed here, which allows using minimal kernel configurations and concentrate on learning the kernel of the OS from the very beginning of the course. Why, after all, is Linux chosen to represent the foundations of operating systems, and, for example, not Microsoft Windows? There are several reasons: the open source Linux, the UNIX ideology embedded in it, the main ideas of the OS implemented in UNIX / Linux are also used in Microsoft Windows: multitasking, hierarchical file system, multi-user system, virtual memory, built-in network stack, multithreading, and, Most importantly, the Linux kernel is increasingly being chosen for building computer systems of various levels from distributed and cloud servers in a corporate system to mobile systems embedded in control chips. 1 Vlasov S.V FKN VSU, Voronezh 1

2 Lecture 1. Basic concepts. OS operating system is a software product designed to manage computer resources: hardware, data, programs and processes. A mandatory component of the OS is the kernel, all other components are applications added to the OS if necessary. For example, when they say: “Linux version...” they mean the kernel (kernel), but by GNU/Linux they mean some clone with a specific kernel and set of applications (Debian, Red Hat, Susse, etc.) The OS kernel is required OS component that provides the data structures, programs and processes, and hardware-specific code needed to manage computer resources. There are various principles for building a kernel: a monolithic kernel (Linux) or a microkernel (eg Minix). The kernel can be customized by adding or removing some components (modules, drivers). A file is a specific sequence of bytes. In UNIX, almost everything is represented by a file. At the same time, only 7 types of files are distinguished (the corresponding symbol is indicated in brackets: in the output of the ls -l command) regular files (-) special files: directories, (d) symbolic link, (l) named pipe, (p) character device, ( c) block device, (b) UNIX socket. (s) The application for which the file was intended or created is responsible for recognizing and processing the internal structure of the file. A hierarchical file system is an abstraction for representing the ordering of files as a tree of directories. The root of the tree is a directory named "/", which is called the root (root) file system (not to be confused with /root). A feature of the Linux hierarchical file system is that it is virtual, in the sense that any node in a single hierarchy can be associated with its own file system of a certain type (ext2fs, ext3fs, riserfs, vfat, etc.) located on separate device, partition, or directly in memory. The directory in the hierarchy used at any given moment by default is called the current working directory. You can use absolute filenames starting from the root /, or relative names starting from the current working directory (dot ".") when the parent directory is denoted by ".." (two dots horizontally without spaces). A program is a file containing executable instructions. A file containing printed text of a program in a programming language is called a program source module. Source written in a scripting language (shell, perl, python, ruby, etc.) ) is executed directly by the language interpreter. Sources in other languages ​​(C, Fortran, etc.) must be compiled to convert the source text into an executable program module containing processor instructions in binary format (evolving from a.out and COFF to ELF). A process is a program at run time. Processes are also organized in a hierarchy with parent-child relationships. All processes in UNIX have a unique integer identifier (PID). The root process of the hierarchy is process number 1, which is the init process spawned when the operating system kernel is loaded and spawning other child processes. When the OS is running, any process other than init can be stopped. There is also a hidden process 0 - swap, which is responsible for paging virtual memory. Logon process is the parent process for all processes generated by the user Vlasov S.V FKN VGU, Voronezh 2

3 systems running in multi-user mode. The task of this process is to check the security attributes (login name and password) of the user and start the process that provides the OS interaction interface with the user, usually a shell command language interpreter. The shell interpreter is a program that is part of a specific OS to provide user interaction with the OS. UNIX/Linux systems use various interpreters: bash, csh, tcsh, ksh, zsh, and many others. The default interpreter on GNU/Linux systems is usually bash. The interpreter provides a command line for running standard user commands and programs. Vlasov S.V FKN VSU, Voronezh 3

4 Practical examples. Login via SSH client (PuTTY) In MS Windows, select Start->Run and enter: X:/Putty/Putty.exe In the Putty Configuration window that opens, enter in the Host Name (or IP address) field: www2 Clicking on Open will result in connection to the www2 server and the logon window appears, in which the first time you try to connect to the Linux server, a PuTTY Security Alert message appears about the absence of a new RSA key in the registry cache agree to include the key in the cache for a trusted connection to the server now and in the future. Click Yes. An invitation will appear in the DOS window Vlasov S.V FKN VSU, Voronezh 4

5 Logon as: name password: where you enter your login name (instead of name) and password. Be careful when entering a password, because the keys you press are not displayed when you enter them, even there are no asterisks. If everything is done correctly, then you will see in the same window the shell prompt 2:~$ _ Now you can interact with the Linux OS through the command line interface. 3 In what follows, we will only use the $ symbol to denote the command line, although you may have the path to the current working directory in front of it. Where are we? (home directory) When logged into the system, each user is assigned a secure home directory to store personal files. When you log in, the logon process automatically mounts your home directory as the current working directory. The three following commands should show the same result with the full path to your home directory. $ pwd $ echo ~ $ echo $HOME What do we have? (auto-generated files) The contents of the current working directory can be displayed with the command: $ ls When you first log in, this list is usually empty. 4 However, when a user logs in, some hidden service files are created in his home directory, which can be modified by the user himself to configure the required environment. The -a switch of the ls command allows you to see in the list of contents of the current directory all hidden files named with the prefix "." (dot) $ ls -a Incidentally, this list also includes the anonymous names of the current directory "." and parent directory "..". By giving your own file a name prefixed with "." (dot) you make it hidden. What system is being used? Operations and system setup options vary depending on the OS version you are using. To get information about this, use the command $ uname -a Brief information about the parameters and options of the command can be obtained using the help key, for example, 2 If you have problems connecting to the server or entering a name and password, you have only one way out, contact the server system administrator . 3 The $ character before the cursor is a command line character and is the default for a normal user in the bash command interpreter. (The symbol # is used for the root superuser) 4 Perhaps you have a public_html directory that can be used to exchange files between Linux and MS Windows systems thanks to the corresponding service. Vlasov S.V FKN VSU, Voronezh 5

6 $ uname --help A detailed description of UNIX commands and functions can be obtained from the documentation called "manual pages" ("manual pages" - system manual): $ man pwd $ man ls $ man echo $ man uname Manual pages are presented in a special format nroff /troff/groff and are formatted on output by the appropriate utility, depending on the type of output device. You can end the browsing of man pages by pressing the Q key $ man man Man files are usually stored in packaged form (suffix.gz or .bz2) and are organized into sections: 1. General commands 2. System calls 3. C library functions 4. Special files 5. File formats and conversion 6. Games and screensavers 7. Extras 8. Commands and daemons for system administration The section number is used when referring to the command or function being used, for example, printf/3 and specified as the first parameter of the command $ man 1 printf $ man 3 printf The directory in which the command's man page resides can be determined using the -w $ man -w command Hierarchical File System The ls command can be used to list the contents of any directory in the file system hierarchy (regardless of the physical device and type of file system on the partition or in memory). For example, the root filesystem is displayed with $ ls / However, to display the structure of the entire tree requires a fair amount of ingenuity, for example, $ ls -R grep ":$" sed -e "s/:$//" -e "s/[^-][^\/]*\//--/g" -e "s/^/ /" -e "s/-/ /" where grep regex filter, sed stream editor and unnamed pipes (pipes), denoted by the symbol (pipe). In your home directory, you can create a new (empty) directory node in the hierarchy, for example, lab1 Vlasov S.V FKN VGU, Voronezh 6

7 $ mkdir lab1 Any node in the hierarchy can be selected as the current $ cd lab1 $ pwd To return to your home directory (as defined by the HOME environment variable), use the cd command with no options $ cd $ pwd You can remove an empty directory with the rmdir command, for example $ rmdir lab1 If the directory is not empty, then the last command (if lab1 contains some files) will print the messages rmdir: lab1: Directory not empty and the deletion will fail. In the current directory, you can create, for example, a text (regular) file. To do this, you can use the redirected output of the command echo $ echo "echo Print directory tree " > tree A tree file is created, the contents of which can be displayed with the command $ cat tree or in page formatted $ pr tree You can even add a new line to the end of an existing file, for example, $ echo using grep and sed >> tree $ cat tree You can use the ed line editor, a standard editor designed to edit text from a typewriter console. $ ed tree a ls -R grep ":$" sed -e "s/:$//" -e "s/[^-][^\/]*\//--/g" -e "s /^/ /" -e "s/-/ /". wq $ cat tree In fact, we have created a file with commands here, which can be executed as a new command if it is declared “executable”: $ chmod +x tree $./tree Vlasov S.V FKN VGU, Voronezh 7

8 Note that an attempt to execute a file without specifying the current directory, i.e. simply tree rather than ./tree as shown above will not find the file in the current directory. This is because, for security reasons, the anonymous current directory is not included in the PATH environment variable used to find the program to run by name. $ echo $PATH A complete list of environment variables and their values ​​can be obtained by the user with the command: $ env To create text files, you can also use the cat command with output redirected to a file $ cat > file text Ctrl-D Here, pressing Ctrl-D passes to the input stream end of file (EOF) character END OF TRANSMISSION. You can also add text to the end of a file $ cat >> file append text Ctrl-D To create large text files, for example with C source code, powerful on-screen text editors such as vi/vim, nano, or emacs are used. Removing a file is done with the $ rm file command. Among other things, the -r or -R switch allows you to recursively delete a subtree of directories. To safely delete files, it is recommended to use the -i switch, which generates a request to confirm the deletion. Moving and renaming a file is done with the command Date and time $ mv old new The current system time and date can be determined with the $ date command To change the time and/or date, use the parameter in the MMDDhhmmYY format. For example, for the job January 24 8:36 PM 2011, enter $date Note also that the time command that exists on UNIX systems shows the time used by the next process (real time, user mode execution time, and kernel mode time) , not the current system time. Try Vlasov S.V FKN VGU, Voronezh 8

9 $ time date you should get something like this output real user sys 0m0.040s 0m0.000s 0m0.040s Who else is on the system? UNIX OS is a multi-user system that allows several users to simultaneously execute a logon process and work in the system independently of each other. To determine who is currently logged in, the $ who command is used, showing the user's login name, terminal, and the time the logon process was initiated. In a multi-user system, the same user can use several different terminals at the same time (for example, several parallel SSH sessions). To determine who is using the current terminal, you can use the command $ whoami Registered Users So, to use the system, you need to be a registered user. Registration is carried out by a system administrator with superuser rights, which has a standard name in UNIX/Linux systems - root. 5 Usually, all user registration records are stored in a single file /etc/passwd, which is readable by everyone $ cat /etc/passwd In earlier versions of the system, the encrypted password (hash) of the user (the second field after the username , separated by colons). But on newer systems, it's customary to store password hashes in another /etc/shadow file that is not readable by anyone other than root. The password field in the /etc/passwd file only stores a hidden reference to the /etc/shadow entry, so only the "*" character is displayed. To change the current password on UNIX systems, use the $ passwd Changing password for name command. (current) UNIX password: user's current password new UNIX zfyycqw: new password retype new UNIX password: new password (again exactly as in the previous line) passwd: password updated successfully or passwd: Authentication token manipulation error BAD PASSWORD: it is too simple simplistic/systematic 5 Usually, root is not used to log in; instead, the administrator creates a regular login for himself, but uses the su command to perform operations that require superuser privileges. In Linux systems, a group of privileged users sudoers is popular, who get the right to perform operations with root rights through the sudo command Vlasov S.V FKN VGU, Voronezh 9

10 In this case, you must enter a different password. Note that the passwd process runs in a special superuser mode and ignores the SIGINT signal sent by pressing Ctrl-C and thus cannot be interrupted. Simple way of communication Users working in the system at the same time can send short messages to each other using the command $ write name The user with the specified name/terminal will immediately receive the notification Message from your_name on tty0 at 10:30.. and if you continue typing on your terminal (here on tty0), then the message will immediately appear line by line on the terminal of the user with the name specified in the command. To end the message, type Ctrl-D. However, if your opponent does not wish to receive any messages, then he uses the $ mesg n command to disable the ability to send/receive write messages. To enable this feature, the user must run the command $ mesg y If you want to send a message to all users in the system at once (those who have messages enabled), you can use the command $ wall message up to 20 lines Ctrl-D End the session $ logout You can also use Ctrl-D or $ exit The logout command may not end the session, but instead display one of two messages, or There are stopped jobs not login shell: use "exit" Z) tasks. You have the option to continue running jobs (with the jobs and fg commands) until they complete normally. However, if this is not done, suspended jobs will be terminated (on a SIGTERM signal) when the logout or Ctrl-D command is issued again. The second message means that you have spawned child processes from the shell started by the logon process that are running the current shell session that is not associated with the logon process. Vlasov S.V FKN VSU, Voronezh 10

11 It is necessary to execute the command exit or Ctrl-D in the current shell to return to the shell process spawned at logon. OS is a complex software system consisting of subsystems for managing various resources. The purpose of the course is to study the main features of the functioning of the UNIX/Linux kernel subsystems through the system call interface. Vlasov S.V FKN VSU, Voronezh 11


MINISTRY OF EDUCATION AND SCIENCE OF THE RF

6.31. cycles. Parameter shift. for variable in values ​​do statements done for var1 in value1 value2 value3 do echo $var1 done for File1 in $(ls *.sh); do echo $File1 >> All.txt done while condition do

Information Technology Lecture 3 1 The bash shell 2 Basics Shell or shell text mode operation (command line interface) Graphical user interface (GUI)

SHELL Definition: Shell [shell] An operating system command interpreter. Shells are divided into two types, depending on the organization of work with the user: - command line interpreter; - graphic

2 Navigation The first thing we'll try to learn (after a few keystrokes) is navigating the Linux file system. In this chapter, we'll introduce the following commands: pwd

SibGUTI Department of VS Programming in a high-level language (HLE), semester 1 2009 2010 academic year Polyakov A.Yu. Laboratory work 1. Linux OS programming environment. Purpose of work: To get acquainted with the software

Lecture 2. Process control subsystem. Process management in a multitasking system consists in allocating kernel resources for each running process, performing process context switching

MOSCOW STATE TECHNICAL UNIVERSITY them. N.E. BAUMAN Faculty of Computer Science and Control Systems Department of Automated Information Processing and Control Systems Semkin P.S., Semkin

Working with OS GNU/Linux in Terminal Classes of the Department of Sun Purpose of the work: to get acquainted with the software of OS GNU/Linux to write the simplest program in C language. Operating system (OS) GNU/Linux

BOIN system. Conducted by: Khrapov Nikolai Pavlovich Institute for Information Transmission Problems of the Russian Academy of Sciences Practical lesson Basics of working with Linux OS Installation of a BOINC server Practical lesson Basics of work

OS Components Main OS Components 1. Process Management 2. Main Memory Management 3. File Management 4. I/O System Management 5. External Memory Management 6. Networking Support

Introduction to the Linux command line How to stop worrying and love the shell Aleksey Sergushichev Practical school on bioinformatics ISL "Computer Technologies" 19.02.2014 Command line Command line

Linux operating system Lecture 6 The command shell (shell, bash) is a command line interface in Unix-like operating systems, that is, it executes commands that the user gives, or that are read

Laboratory work 4 ACQUAINTANCE WITH PROCESSES Purpose of work To get acquainted with concept of process. Learn to get a list of processes available in the system and manage their state. 1. Theoretical information

File naming patterns, file searching, and other UNIX features Linux login Run putty.exe Enter ip address Click Open Username studentx Password studentx 2 Create a directory

Table of contents Preface 6 Lecture 1. Linux session 8 .................. 13 1.3 Simultaneous access to the system ..................

Accessible to the layman, the basics of the vast world of the UNIX system are outlined. The user gradually learns to enter the system, use various commands, ask for help, find

Working with Standard Document Templates User Guide for Cognitive Technologies Moscow, 2015 2 ABSTRACT This document provides information about the use in the E1 Euphrates software package

Computer science Information technology Lecture 1. Introduction to Linux OS Main features of Linux Real multitasking Multi-user access Swap RAM to disk Paging

Other languages: English Russian iridium Server for Raspberry Pi Installing and configuring a server in an i3 lite project iridium Sever for Raspberry Pi is a software implementation of iridium Server that runs

FEDERAL AGENCY FOR EDUCATION Tomsk Polytechnic University 2009 SIMPLE SHELL TOOLS Guidelines for performing laboratory work

Lesson 3. Topic: Accounts in Linux. Type of lesson: lecture, practical lesson. Training questions: 1. The concept of an account and authentication. The files /etc/passwd and /etc/group, /etc/shadow and /etc/gshadow.

Annotation of the program of the discipline "Operating Systems" 1. The objectives of mastering the discipline The objectives of mastering the discipline "Operating Systems" are:

Laboratory work 2. Navigating through the file structure and its maintenance by means of the Xubuntu OS terminal. Practical part II. Navigation through the file structure and its maintenance by means of the OS terminal

Page 1 of 7 News Hardware Linux Cluster Resource Usage Statistics Registration on Linux Cluster Registration on SPP-2000 AFS File System Network Security Issues Libraries

Basic concepts and definitions Operating system (hereinafter referred to as OS) is a software package that controls the functioning of a computer and ensures the interaction of devices included in it.

Chapter 1 Choosing an Operating System The fact that you are reading this book indicates that you want to learn Linux. Before you begin this journey, you must understand what an operating system is.

Practical work 10 Working with files in LINUX The purpose of the work: to study the features of working with files in the Linux operating system. Work plan: 1. Get acquainted with brief theoretical information.

APPROVED -LU INFORMATION PROTECTION SYSTEM AGAINST UNAUTHORIZED ACCESS Dallas Lock Linux Operator's (User's) Manual Sheets 11 2016 2 Abstract This operator's manual is distributed

Information Technology Lecture 2 Linux Commands 2 Linux Commands Linux Console Commands - Interaction between User and OS Executed via the command line by manual input Behind each command

Hardware-software complex of trusted download "Blokhost-MDZ" Installation guide for HSS "Blokhost-MDZ". Installation guide. Page 2 Annotation The document describes the installation

Multifunctional hardware and software complex for providing communication services "IS RINO" Basic software Control server CONTENTS 1 INTRODUCTION... 3 2 SOFTWARE COMPOSITION... 3 3 SERVER INSTALLATION...

Rutoken Logon. Administrator guide 2018 Aktiv company In this document This document contains answers to the following questions: What is the Rutoken Logon software product used for? (see p.

Lesson content Terminology Remote access tools Login 1 User (user) user, account (account). An object for recording system actions. Login 1. User/account name

Tasks Part 1: Run FTP from the Command Line Part 2: Download an FTP File Using the WS_FTP LE Client Part 3: Run FTP in a Browser Background/Script FTP (File Transfer Protocol) is included

General principles of organization, composition, structure of operating systems and their shells, as well as a number of specific systems are considered. Considerable attention is paid to the problems of information management, processes

And setting up a FreeBSD network operating system FreeBSD FreeBSD is a modern operating system for servers, desktops and embedded computing platforms. FreeBSD provides modern networking

LLC "Company" ALS and TEK "Software of the family of switches ALS-24000, v. 6.01 Installation manual Sheets 13 2017 2 1. GENERAL INFORMATION 3 1.1. Purpose and scope 3 2. COMPUTER REQUIREMENTS

IV. METHODOLOGICAL INSTRUCTIONS FOR THE ORGANIZATION OF STUDENTS' INDEPENDENT WORK WHILE STUDYING THE DISCIPLINE "OPERATING SYSTEMS" p / p Name of the section of the discipline 1. The evolution of operating systems. Purpose

Operating system The operating system is the most important program The operating system is a set of programs that ensure the interaction of all hardware and software parts of the computer with each other and

4 Lab 1. Installing and configuring the operating system on a virtual machine 1.1. The purpose of the work The purpose of this work is to acquire practical skills in installing the operating system

Federal State Budgetary Educational Institution of Higher Professional Education "National Research Tomsk Polytechnic University" APPROVED: Head of Academic

Laboratory work 1. Navigating through the file structure and its maintenance using the command line interpreter of Windows OS Theoretical part. directory a special kind of file containing the names of subdirectories

Operating system Software The operating system is the most important program The operating system is a set of programs that ensure the interaction of all hardware and software parts

Licensing and protection system for platform configurations 1C:Enterprise 8, version 3.0 Administrator's guide Supported operating systems... 1 System composition... 1 SLK server... 1 External component...

Introduction Working with the GNU/Linux operating system Currently, the main interface for user interaction with the desktop operating system is the graphical user interface (Graphic

PRACTICAL WORK 2 OS Windows command line The purpose of the work: to study the command line interface of Windows OS, to acquire skills in solving typical tasks of administering the Windows operating system using

Laboratory work 2 Managing files in the operating system Goals and objectives of the laboratory work to gain skills in working with an operating system such as Linux; learning the basics of operating room management

THERMIDESK VIRTUAL WORKSTATION CONNECTION MANUAL ADMINISTRATOR'S MANUAL (preparation of the basic workstation) 23811505.6200.001.И5.01-2 Sheets 17 MOSCOW 2018 1 CONTENTS 1 INTRODUCTION...4 1.1

FGOBU VPO "SibGUTI" Department of Computer Systems Disciplines "PROGRAMMING LANGUAGES" "PROGRAMMING" Practical lesson 55 OS GNU/Linux Lecturer: Associate Professor of the Department of VS, Ph.D. Polyakov Artem Yurievich

Appendix WORKING PROGRAM OF THE EDUCATIONAL DISCIPLINE OPERATING SYSTEMS AND ENVIRONMENTS The working program of the academic discipline Operating Systems and Environments was developed on the basis of the Federal State

2.1. Files. Information storage requirements: the ability to store large amounts of data information must be retained after the termination of the process multiple processes must have simultaneous

Programming languages ​​and translation methods Presentation for laboratory work 2 Windows operating system Contents 2 Contents 3 The concept of the operating system Operating system (OS) basic software

Installing IBM DB2 v11.1 Server on Linux Installing IBM DB2 using the installation wizard requires a GUI installed and running, including the core X-Window packages,

1.1 History of the OS The first (1945-1955) computers worked without operating systems, as a rule, one program worked on them. When the speed of execution of programs and their number began to increase, idle

Managing Rutoken drivers using group policies 2017 Aktiv company This document This document describes how to use group policies to automatically distribute the kit

Topic: Purpose: Practice 23. Ubuntu basics. Get acquainted with the Ubuntu OS interface, learn how to work with files and directories, run programs, view text and graphics

Secret Net Information Security Tool Secret Net Client Local Upgrade Instructions This document contains a detailed description of the sequence of actions for local client upgrade

About the Authors 15 Introduction 17 Book Structure 18 From the Publisher 20 Chapter 1. A Brief Overview of the Basics 21 Some Basic Commands 21 Displaying Date and Time: the date Command 21 Retrieving Registered Users

HV Manager User Guide 2017 AprilTech, llc. All rights reserved 1 CONTENTS Introduction... 3 Installation and configuration... 4 System requirements... 4 Installation... 5 Configuration... 6 Setup

1 Lab 3 "DATA STREAM REDIRECTION" Streams and Files Logically, all files in a Linux system are organized into a continuous stream of bytes. Any file can be freely copied and added to another

To begin with, it would be nice to have a general idea of ​​what Linux is and how it works.

And you can start with Introductions to Linux(sxw). Although there are other introductions. For example this. Here is the paper by R.S. Klochkov and N.A. Korshenin Fundamentals of UNIX and Linux (SXW), (PDF).

Fundamentals of OS UNIX. Training course. (SXW) (PDF)
Copyleft (no c) - Fuck copyright! 1999-2003 V. Kravchuk, OpenXS Initiative
This short (estimated to be 16 hours, of which 6 are hands-on) introductory course is designed to introduce you to the architecture, features, and fundamentals of the UNIX operating system. Upon successful mastering, the course will allow you to work freely and productively in UNIX as a user and continue studying the administration or programming of this operating system.
The presentation is conducted, basically, without reference to the features of any version of UNIX, but if necessary, it is made for SVR4 systems, in particular, Solaris 8 OS.
I also recommend a book Andrey Robachevsky"UNIX operating system"
Here is what the author writes: “This book is not a replacement for reference books and various manuals on the UNIX operating system. Moreover, the information presented in the book is sometimes difficult to find in the documentation that comes with the operating system. These publications are full of practical recommendations, a rigorous description of the settings of various subsystems, command call formats, etc. At the same time, questions such as the internal architecture of individual system components, their interaction and principles of operation often remain behind the scenes. Without knowledge of this "anatomy", work in the operating system turns into the use of memorized commands, and inevitable errors lead to inexplicable consequences. On the other hand, UNIX administration, configuration of specific subsystems, and commands used have received much less attention in this book. The purpose of this book is to present the basic organization of the UNIX operating system. It should be borne in mind that the name UNIX denotes a significant family of operating systems, each of which has its own name and features inherent only to it. This book attempts to isolate the common elements that make up the "genotype" of UNIX, namely the basic user and programming interfaces, the purpose of the main components, their architecture and interaction, and on the basis of this present the system as a whole. At the same time, where relevant, references to a specific version of UNIX are provided.

Personally, reading a wonderful book by Viktor Alekseevich Kostromin helps me a lot. Linux for the user” which I can offer you (kos1, kos2, kos3, kos4, kos5, kos6, kos7, kos8, kos9, kos10, kos11, kos12, kos13, kos14, kos15, kos16, kos17, kos18).
And here is the same book, but already in PDF (kos1, kos2, kos3, kos4, kos5, kos6, kos7, kos8, kos9, kos10, kos11, kos12, kos13, kos14, kos15, kos16, kos17, kos18).
And now also in SXW (kos1, kos2, kos3, kos4, kos5, kos6, kos7, kos8, kos9, kos10, kos11, kos12, kos13, kos14, kos15, kos16, kos17, kos18).
If you prefer documents in HTML format, then the links above can take you to a page where you can download archives of book chapters in this particular format.

From fundamental books, I can also advise the excellent guide by Karl Schroeder Linux. Collection of recipes». I immediately warn you that this link is a book in .pdf format, and it weighs 50 MW. But an alternative option is also possible - the same book, only in

FORMAT.TXT The summary of the book is as follows: “The proposed edition contains a unique collection of tips, tools and scenarios; you will find a number of ready-made debugged solutions to complex problems that any administrator faces when setting up a Linux server; these solutions will be useful both when setting up small networks and when creating powerful distributed data warehouses. The book is written in the now popular form of O'Reilly recipe books in the Problem-Solution-Discussion format. For experienced users, programmers, system administrators, university students, graduate students and teachers. If suddenly the link ceases to exist, please let me know - maybe I will post the .pdf file on my site.

I really like a series of articles and notes by Alexei Fedorchuk, Vladimir Popov and a number of other authors, which I take from here: http://unix.ginras.ru/. Here are the most interesting materials about Linux in general and its individual components in particular(Linux-all.zip, Linux-all2.zip, Linux-all3.zip, Linux-all4.zip).
SXW - (Linux-all.zip, Linux-all2.zip, Linux-all3.zip, Linux-all4.zip),
As well as a book by Alexei Fedorchuk" The POSIX Saga or Introduction to POSIXism” which covers general issues of a number of systems, primarily about UNIX-like ones. The name speaks for itself. According to the authors, the book is intended for users (including beginners). Here are the files - Part 1, Part 2, Part 3, Part 4.
AND SXW- Part 1, Part 2, Part 3, Part 4.

And if you are interested in the history of FREE SYSTEMS, you can read the Selection of articles, under the general title A road open to all» (sxw) and, according to the author, covers general issues of Open Sources, POSIX systems, the history of UNIX, BSD, Linux

Also, for understanding the principles of the OS, the concept of a process, along with the concept of a file, is, of course, one of the most important concepts. This is the subject of the article by V.A. Kostromina » Processes and Daemons in Linux» (SXW .

Text-Terminal-HOWTO(SXW)v 0.05, June 1998
This document explains what text terminals are, how they work, how to install and configure them, and some information about repairing them. It can be used to some extent even if you don't have a terminal manual. Although this work is written for real terminals on a Linux system, some of it is also applicable to terminal emulators and/or other Unix-like systems.

It is also very useful to read the beautifully illustrated manual for a faster and easier development of the console - Working with command history(SXW).

Here are materials on command shells, or command interpreters, also referred to simply as shells. First of all, a selection of articles that are combined under the title Shell and utilities(SXW), (PDF).

The most popular shell today is Bash - short for Bourne Again SHell (Another Bourne shell). I advise you to read BASH abstract, (SXW), (PDF)
Creation date: 12/16/97.

And Features of the bash shell(SXW), (PDF).
The document briefly summarizes what Bash inherited from the Borne shell: shell control structures, builtins, variables, and other features. It also lists the most significant differences between Bash and the Bourne shell.

Shell command language interpreter(SXW), (PDF) is a command language that can execute both commands entered from the terminal and commands stored in a file.

Shell programming(UNIX) (SXW), (PDF)

If Windows freezes, the user makes some gestures, and then, convinced of the “vanity and vanity of this world”, presses RESET with a calm heart. In Linux, things are different. About this article - hanging? Let's shoot!(SXW)

Q&A by kppp(SXW)

Article by V.A. Kostromin “ Hierarchy of directories and file systems in Linux» (SXW), which describes the standard developed by the Open Source project for the directory structure of UNIX-like operating systems (Linux and BSD systems are implied).

About files (which in Linux, in fact, are directories, and even devices), but from a slightly different perspective, the manual tells Files and their permissions(SXW).
Highly recommend. Chewed up wonderfully.

Linux commands and abbreviations(SXW).
This is a practical compilation of programs that we use most often, find useful, and that are present in our Linux distributions (RedHat or Mandrake).

UNIX consoles(SXW) - notes about various consoles.

Here is a bad guide Mandrake Linux 9.0 Command Line Manual(SXW).

Mounting filesystems from devices and files(SXW) (PDF)
Document creation date: 07/26/2004
Last modified date: 08/20/2004
Author: Knyazev Alexey.



Loading...