Experimental Linux - Linux Terminal Login

Experiment 1: Log in Linux terminal

 

  1. Experimental preparation
  1. OK Linux systems.
  2. To determine the user's login name (User ID).
  3. Determine the password.
  4. Currently, the system has created two users: root and linux, password is 123456.

 

  1. lab environment
  1. PC Taiwan.
  2. Operating system CentOS.

 

  1. Experimental Procedure
  1. log in system.

a. Open VMware Workstation, running CentOS 7.

b. Use the root user login system.

c. Create a new file on your desktop newfile, find a graphical text editor, open the file and enter the Hello, world! Then save the file.

d. Desktop directory to find the path.

  1. Use shell

a. Locate and open the Terminal (Terminal application).

b. View features a command prompt to determine the current type of shell.

  1. Execute the man command, learn to use help.

d. Who command execution and who am i, comparison of the results of its execution.

e. Execution date command, see the output.

  1. Man cal command execution, see functional description and syntax definitions cal command and perform validation.
  2. Execute man ls command to check the functional description and definition of the ls command syntax, and perform validation.

h. Execute man cd command to check the functional description and syntax definitions cd command and perform validation.

i. Use ls command to view the contents of the home directory, then switch to the root directory, to view its contents.

j. View the current system default shell, shell and other systems already installed. If you have other shell, the default shell switch to other shell.

 

  1. Create a new user

a. Execute man useradd command, learn how to create a new user.

b. Man groudadd execute commands, learn how to create a group.

b. Create a new user using the useradd command, the following:

User name: ccst + name Pinyin initials,

User number: 4 after school,

Home directory: / home / username ,

shell为:/bin/bash,

Default groups: user.

  1. Use the passwd command to set a password luser

d. Switch to virtual terminal 1 to luser logged in to view prompted after a successful login.

[ Tip ]

System, a total of six virtual terminals, numbered 1-6. There are two ways to switch:

1. Key combination

Switching ctrl + alt + (F2-F6) to a character terminal, ctrl + alt + F1 is switched to the graphic terminal

2. chvt command

chvt [1-6]  

1 is a graphic terminal. 2-6 as a character terminal.

 

  1. Exit the current user

a. Were used [Ctrl-d], exit command, logout out the current user. Determining which key or combination of commands is available, and whether they are the same effect.

b. Back to the graphics terminal.

  1. Using PuTTY to connect virtual machines.

a. Check online the role and usage of putty.

b. CentOS using putty to connect to the virtual machine.

(Need to configure the network card CentOS virtual machines, there are two ways: bridging and bridging using NAT requires a separate virtual machine for the NIC to configure a separate IP address, the IP address of the host machine just to give way in the same network segment .NAT virtual machines can be automatically assigned IP.)

  1. Shut down the system

a. At least two find a way to shut down the system.

b. Execute shutdown -h now command to shut down the current system.

 

 

Published 58 original articles · won praise 22 · views 9856

Guess you like

Origin blog.csdn.net/zsd0819qwq/article/details/103868804