Basics of Linux

Source: Internet
Author: User
Tags temporary file storage

Basics of Linux

1. computer components and functions.Computer systems are mainly divided into hardware systems and software systems. (1) The hardware system consists of five parts, including: Controller: scheduling program, Data, address, coordination of various computer work and access to memory and peripherals; Host: data processing; Memory: storage program, signal, command, data and other information, and provide such information as memory and hard disk as needed; input device: input the program, command, text, data, and other information to a computer system, such as a keyboard or mouse. output devices: send data, text, control signals, and other information, such as monitors and printers. The controller and the monitor constitute the CPU. (2) A software system consists of two parts: System Software: A system that controls and coordinates computers and external devices and supports application software development and operation, such as Windows, Linux, Dos, unix; Application Software: software provided to meet the application requirements of users in different fields and different problems, such as text processing software and graphic processing software. 2. List the releases of Linux by series, and describe the connections and differences between different releases.Debian-based release: a wide range of software, powerful package management tools, and stable systems Ubuntu: known as Knoppix for desktop applications: known as RedHat-based release for security software: RedHat Enterprise Linux: for enterprise users, the Linux system is highly stable and supports multiple platforms for virtualization CentOS: for the paid version of RHEL, The ora system is developed by the Community for the second time: Personal desktop edition, A basic release of Slackware-based release every six months: Slackware: known for its simplicity, security, and stability. u. s.E: openSUSE: well-known as SLES: Enterprise SUSE system, which is converted into servers. Other mainframe designs: Gentoo: have higher requirements for users, support customization, and be more free and transparent. ArchLinux: simple and simple, minimize code and fast software updates 3. Describe the philosophy of Linux and explain it according to your own understanding.1. All files: almost all resources are abstracted as files, including hardware devices and even communication interfaces. 2. Small files are composed of multiple single-functional programs, A program only does one thing and completes the complex tasks by combining small programs. 3. Avoid interacting with users as much as possible and implement automated tasks by programming; 4. Use a text file to save configuration information. You only need to modify the configuration file for any configuration modification. 4. describes the format of commands used on Linux. describes the use of ifconfig, echo, tty, startx, export, pwd, history, shutdown, poweroff, reboot, hwclock, and date commands in detail, it is explained with the corresponding examples.(1) ifconfig: view the NIC information and modify the configuration format: ifconfig [-v] [-a] [-s] [interface] ifconfig [-v] interface [aftype] options | address... example: ifconfig -- View All Nic information ifconfig InterfaceName up/down -- enable NIC/disable Nic ifconfig [-] arp -- enable ARP Protocol/(with horizontal bars) Disable ARP Protocol (2) echo: echo [SHORT-OPTION]... [STRING]... example: echo-n "hello world. "-- display hello world. echo-e "hello \ t world. "-- The Escape Character takes effect and the output is hello world. (3) tty: view the current terminal device format: tty [OPTION]... (4) startX: enabled X Window format: startx [[client] options...] [-- [server] [display] options...] (5) export: set or display the environment variable format: export [-fnp] [NAME] = [VALUE] example: export TEST = "8" -- Define environment variables and assign values to export-p -- list the current environment variables (6) pwd: display the current working directory format in an absolute path: pwd [OPTION]... (7) history: display or manipulate historical command List format: history [OPTION] [ARGS] example: history-c -- clear the history command history-a -- write commands in the history command buffer to the history command file history-r -- read commands in the history command file into the current history command buffer (8) shutdown: shutdown or restart format: shutdown [OPTIONS...] [TIME] [WALL...] example: shutdown-c -- shutdown or shutdown restart-h + 5 -- shutdown in 5 minutes -- shutdown in 5 minitues. "-- shut down after 5 minutes, and send a warning message to the logged-on user (9) poweroff: Shut down and cut off the power format: poweroff [OPTIONS...] example: poweroff-w -- do not really close the system, only write records to the poweroff-n in the log file "/var/log/wtmp" -- disable sync when operating the system (10) reboot: restart format: reboot [OPTIONS...] (11) halt: shutdown format: halt [OPTIONS...] example: halt-p -- Turn off the system and power off halt-d -- Turn off the system but do not record (12) hwclock in wtmp: access or set the hardware clock format: hwclock [function] [option...] example: hwclock-s -- synchronize the hardware clock to the system clock hwclock-w -- synchronize the system clock to the hardware clock (13) date: display or set the clock format: date [OPTION]... [+ FORMAT] example: date + "% Y-% m-% d" -- format and output date-d "1 year ago" -- output date-s "20180225" one year ago -- set date "20180225" change the time to "00:00:00" at the same time" 5. For details about how to obtain command help information on Linux, refer to and describe how the man document is divided.Built-in command to get help information: help <command>; external command to get help information: <command>-h/-- help, man <command>, info <command>. Linux man is divided into nine chapters (compressed files): man1-all users can use the command, man2-system kernel call command, man3-C Library call, man4-device files and special files, man5-file format (command Configuration File Syntax), man6-game-related, man7-Miscellaneous, man8-administrator commands, man9-files related to the kernel. 6. List the naming rules and functions of the basic directories of Linux distributions.1. Linux naming rules: the kernel version consists of the main version number, minor version number, and last version number. If the minor version number is an odd number, the development version number is used. If the minor version number is an even number, the kernel version number is a stable version. 2. File naming rules: (1) file names are case-sensitive. (2) file names can contain any character except/. (3) The file name length cannot exceed 255 characters. (4) to. the file that starts with "hide" is a hidden file. 3. file type: f-common file, d-directory file, l-Symbolic Link file, B-block device file, c-character device file, p-pipeline file, s-socket file. 4. File System:/bin: Basic command program files available to all users;/sbin: tool programs for system management;/boot: the boot loader must use the following static files: kernel, initramfs (initrd), grub, etc./dev: stores special files or device files: the device has two types, character devices (linear devices) and block devices (random devices);/etc: configuration file of system programs, which can only be static;/home: centralized location of home directories of common users; /root: Administrator's home directory;/lib: Provides shared libraries for system startup and applications (/bin,/sbin, etc.) on the root file system, and provides kernel modules for the kernel;/lib64: A directory exclusive to the 64-bit shared library in the 64-bit system;/media: mount point of the portable device, cdrom, floppy, etc.;/mnt: temporary mount points of other file systems;/opt: installation location of additional applications;/srv: Data provided by the current host for the service;/tmp: temporary File storage directory generated by the application, available All users have special permissions to perform write operations;/usr: globally shared read-only data directory;/usr/local: local application installation;/var: directory for storing frequently changed data;/proc: memory-based Virtual File System, used to store related information for the kernel and process (mostly kernel parameters);/sys: sysfs Virtual File System provides a more ideal way to access kernel data than proc. Its main function is to provide a unified model interface for Linux device management.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.