About Linux
Strictly speaking, Linux is not an operating system, but a kernel in a Linux system, that is, the platform between computer software and hardware communication; Linux is the full name of Gnu/linux, which is a real Linux system. GNU is a project of Richard Stallman, where programmers around the world can transform GNU programs and follow the GPL, allowing anyone to change. However, the modified program must comply with the GPL agreement.
Linux is a multi-user multitasking operating system, is also a free software, fully compatible with the POSIX standard, has a good user interface, support a variety of processor architecture, easy to transplant.
To assign system resources to programs, the software that handles internal details of the computer is called the operating system or the kernel. If you want to learn more about operating system concepts, check out the operating system tutorials.
The user interacts with the Linux kernel through the shell. The shell is a command-line interpreter (a software) that converts commands entered by the user into a language (command) that the kernel can understand.
Linux, a lot of work is done by command, learn Linux, first of all to master the common commands.
Linux version
The kernel version refers to the version number of the system kernel developed by the development team under the leadership of Linus. Each kernel version of Linux is expressed in the form of a set of numbers for x.y.zz-www. which
- X.Y: The major version number for Linux. Usually y if it is an odd number, indicating that this version is a beta version, the system will have more bugs, the main purpose is to provide users with testing.
- ZZ: the minor version number.
- WWW: Represents the release number (note that it is not related to the release version number).
When the kernel function has a leap, the major version number is upgraded, such as Kernel2.2, 2.4, 2.6, and so on. If the kernel adds a small number of patches, the minor version numbers, such as Kernel2.6.15, 2.6.20, and so on, are often upgraded.
Some organizations or manufacturers integrate the Linux kernel with GNU software (System software and tools) and provide installation interfaces and system settings and management tools, which make up a hairstyle kit such as Ubuntu, Red Hat, Centos, Fedora, SUSE, Debian, FreeBSD and so on. With respect to the kernel version, the version number of the release suite varies with the publisher, and the version number of the system kernel is relatively independent. So it's not true that red hat is just like Linux, which is a distribution of Linux, or, more specifically, a Linux-centric operating system software package.
Linux architecture
The following are the Linux architectures:
In all Linux versions, the following key concepts are involved:
- Kernel: The kernel is the core of the operating system. The kernel interacts directly with the hardware and handles most of the lower-level tasks, such as memory management, process scheduling, file management, and so on.
- Shell:shell is a tool that handles user requests and is responsible for interpreting the commands entered by the user and invoking the program that the user wants to use.
- Commands and tools: In daily work, you will use many system commands and tools, such as CP, MV, Cat, and grep. In a Linux system, there are more than 250 commands, each command has multiple options, and there are many third-party tools, and they also play an important role.
- Files and directories: All the data in a Linux system is stored in a file, which is assigned to each directory to form the file system. The Linux directory is a similar concept to the Windows folder.
System boot (boot)
If you have a Linux-equipped computer, the system will automatically start after power-up, and then prompt you to log on to the system, only after logging in for other operations.
Log in to Linux
The first time you use Linux, you will see a sign-in prompt as follows:
Login
Login steps:
- Login Linux must have a user name (user ID) and password, if not, you can ask the administrator.
- Enter the user name at the login prompt and enter it, the user name is case-sensitive, and you should pay attention when typing.
- You will then be prompted to enter your password, and the password is case-sensitive.
- If the user name and password are correct, the login is successful and the last logon information is visible.
Login:amroodamrood ' s password:last login:sun June 09:32:32 from 62.61.164.73$
After you log in, a command prompt ($) appears, and you can enter any command. The following is the CAL command to view the calendar:
$ cal June 2009Su Mo Tu We Th Fr Sa 1 2 3 4 5 for 8 9 10 11 12 1314 15 16 17 18 19 2021 22 23 24 25 26 2728 29 30$
Change Password
The Linux system uses the password to ensure the security of data and files, preventing hackers from cracking and attacking. You can change the password in the following ways:
- Enter the password command.
- Enter the password you are using now.
- Enter a new password. Pay attention to the password not too simple, simple password often for intruders open the door of convenience.
- Confirm the password, and then enter the password again.
$ passwdchanging password for Amrood (current) Linux password:******new linux password:*******retype New linux password:** Passwd:all authentication Tokens updated successfully$
Note: The password you entered is not visible and you will only see a placeholder (*).
viewing directories and files
In Linux, all the data is stored in the file, and all the files are assigned to different directories, and the directory is a tree-like structure called a file system.
You can use the LS command to view the files and directories in the current directory. In the following example, the-l option for the LS command is used:
$ ls-ltotal 19621drwxrwxr-x 2 amrood amrood 4096 Dec 09:59 uml-rw-rw-r-- 1 amrood amrood 5341 Dec 25 0 8:38 uml.jpgdrwxr-xr-x 2 amrood amrood 4096 Feb 2006 Univdrwxr-xr-x 2 root root 4096 Dec 9 urlspedia-rw-r--r-- 1 root root 276480 Dec 9 2007 Urlspedia.tardrwxr-xr-x 8 root root 4096 Nov usr-rwxr-xr-x 1 root root 3192 Nov webthumb.php-rw-rw-r-- 1 amrood amrood 20480 Nov webthumb.tar-rw-rw-r--< C28/>1 amrood amrood 5654 9 yourfile.mid-rw-rw-r-- 1 amrood amrood 166255 9 yourfile.swf$
Note: Directories starting with d*, such as UML, Univ, Urlspedia, and others, are all files.
View Current User Information
After logging into the system, if you want to know your user name (user ID), you can use the WhoAmI command:
$ whoamiamrood$
If you want to know more about the current user, you can use the Who am I command, and the reader can try it out for himself.
View current Online users
If you want to know who is currently online (users who are logged on to the system at the same time), you can use the users, who, and W commands:
$ usersamrood Bablu qadir$ whoamrood ttyp0 Oct 8 14:10 (Limbo) bablu ttyp2 Oct 4 09:08 (calliope) Qadir TTYP4 Oct 8 12:09 (Dent) $
The W command can see more information about the online user, and the reader can try it on his own.
Sign Out
After you have finished your work, you need to exit the system to prevent others from using your account.
Use the logout command to exit the login, and the system will clean up the information and disconnect the connection.
Shut down the system (shutdown)
Relational Linux systems can use the following commands:
Command |
Description |
Halt |
Shut down the system directly |
Init 0 |
Use a predefined script to shut down the system and clean up and update the information before closing |
Init 6 |
Rebooting the system |
Poweroff |
Power off to shut down the system |
Reboot |
Rebooting the system |
Shutdown |
Safe shutdown system |
Note: In general, only Superuser and root (the most privileged user on a Linux system) have permission to shut down the system, but you can also turn off the system by giving the normal user the appropriate permissions.
Linux Learning Series 1---introduction