Linux Startup Process, daemon process, and other

Source: Internet
Author: User
Tags ftp access

Linux Startup Process, daemon process, and other systems: ubuntu server 12.041, linux Startup Process 2, SysV-style Startup Mode 3, runlevel running level 0: system shutdown status, the default running level of the system cannot be set to 0. Otherwise, the running level cannot be started properly. 1: the operating status of a single user, root permission, used for system maintenance. Remote login to the running level is prohibited. 2: multi-User Mode Without Networking Level 3: full Multi-User Mode (with NFS). After logging on to the console, go to Command Line Mode Level 4: multi-user status, the system is not used, the running level is retained 5: X11 console. After logging on to the graphical GUI mode, run level 6: The system is shut down and restarted normally. The default running level cannot be set to 6, otherwise, the running level S cannot be started normally. For example, run a few processes or services to view the current runlevel. Run the command rulevel to switch the running level: init [0123456Ss]/etc/ Inittab: ubuntu 12.04 does not contain this file. create one. Enter the running level: id: N: initdefault: After the system is started :. N is the value corresponding to runlevel. Related tools: sysv-rc-conf, update-rc.d, rcconf, chkconfig 4, ubuntu12.04 how to start to the character interface ubuntu server 12.04 after the desktop is installed, each time the default start to enter lightDM, then enter the desktop environment. The runlevel to be viewed is 2. After the inittab file is changed to 3, the system still enters the desktop. There are no LightDM files in each rcN. d file. Method 1: Modify the kernel startup parameter nano/etc/default/grub modify GRUB_CMDLINE_LINUX_DEFAULT = "quiet splash": GRUB_CMDLINE_LINUX_DEFAULT = "text" and then run the sudo update-grub2. However, in 12.04 server, the value of GRUB_CMDLINE_LINUX_DEFAULT is null (that is ""). While the update-grub2 Command actually points to the update-grub command. Method 2: upstart system/etc/rcN. all files in d are/etc/init. the soft link of the file in the d directory,/etc/init. the d directory is basically a soft connection to the/lib/init/upstart-job file (you can find time to analyze this file ), the upstart system manages all the startup items according to the configuration files in the/etc/init directory. You can modify/etc/init/lightdm. conf. In/etc/init/lightdm. conf, you can see: start on (filesystem and runlevel [! 06] and started tables and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY = 1 or stopped udev-fallback-graphics) or runlevel PREVLEVEL = S) stop on runlevel [06] changed to start on (filesystem and runlevel [! 036] and started login and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY = 1 or stopped udev-fallback-graphics) or runlevel PREVLEVEL = S) stop on runlevel [036] method 3: /etc/lightdm/users. conf (if the test fails, do not understand what hidden-users means, or the configuration file does not work). Find: hidden-users = nobody nobody4 noaccess and change it: hidden-users = sunlt lotte about nobody, nobody4, noaccess: After Windows is installed, some user accounts are automatically created, in Linux, some user accounts are generated after the system is installed, just like the built-in accounts in Windows. They are used to complete specific tasks, such as nobody and ftp. We access LinuxSir. org's webpage program is a nobody user (equivalent to an anonymous account in Windows). ftp or nobody is used for anonymous ftp access. First, nobody is a common user with no privilege. The purpose of using the nobody user name is to allow anyone to log on to the system, but its UID (65534) and GID (65534) do not provide any privileges, that is, the uid and gid can only access files that can be read and written by everyone. Second, in many systems, a nobody is created by default and its permissions are limited to the minimum. When the server provides external services, the client may log on as a nobody. Nobody -- an anonymous user account, assigned by an NFS server when an unauthorized root user makes a request. the nobody user account is assigned to software processes that do not need any special permissions. noaccess -- The account assigned to a user or a process that needs access to a system through some application without actually logging into the system. nobody4 -- SunOS4.0 or 4.1 version The nobody account.5. How to create an rcN-based account. how to soft connect d daemon: bash> ln-s tree.txt treebash> ls-l... lrwxrwxrwx 1 sunlt 8 Mar 21 tree-> tree.txt-rw-r -- 1 sunlt 104946 Mar 20 tree.txt... example 1: the ubuntu system logs that record the switch-on time are generally stored in the/var/log directory. Now, create a simple log that records the switch-on time. The log file is/home/my. log. The mylog-halt file content is as follows :#! /Bin/bashecho "start">/home/my. logdate>/home/my. log File mylog-start contains the following content :#! /Bin/bashecho "halt">/home/my. logdate>/home/my. log puts mylog-start and mylog-halt into/etc/init. d/directory, add the execution permission. Manually link these two files to the corresponding rcN. d directory or use tools such as sysv-rc-conf. Example 2: A web server is a simple python-based web server example py_http.py :#! /Usr/bin/pythonfrom OS import curdir, sepfrom BaseHTTPServer import BaseHTTPRequestHandler, HTTPServerclass MyHandler (BaseHTTPRequestHandler): def do_GET (self ): content = '''  

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.