1. Trang chủ
  2. » Công Nghệ Thông Tin

Tài liệu Logging Into Linux ppt

11 134 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Nội dung

1 - 11 IT Essentials II v2.0 - Lab 10.1.1 Copyright  2002, Cisco Systems, Inc. Lab 10.1.1: Logging Into Linux Estimated Time: 30 minutes Objective In this lab, the student will learn how to boot a Linux computer, log in as the root user, navigate using the Command-Line Interface (CLI), and then shut the computer down. This lab will cover the following CLI commands: • su • whoami • man • ls • shutdown Equipment The following equipment is required for this exercise: • Computer with Linux Red Hat 7.2 installed Scenario The student will boot up the Linux computer and log in using the root user account. The student will run Linux in the command line mode and will shut down the system using the Unix-based shutdown command. 2 - 11 IT Essentials II v2.0 - Lab 10.1.1 Copyright  2002, Cisco Systems, Inc. Step 1 Turn the computer on and observe the boot process. When Linux begins to load, the following screen will be displayed. This screen gives the user the option of booting into the text mode. Press the Enter key to bypass this screen, or wait and Linux will automatically begin to boot (in approximately five seconds). The boot process may take a few minutes. The time will vary according to the speed of the computer. As Linux boots, the Linux processes will load. The screen should look similar to the following as the Linux system boots up. Do these processes make sense? __________________________________________________________________ __________________________________________________________________ __________________________________________________________________ 3 - 11 IT Essentials II v2.0 - Lab 10.1.1 Copyright  2002, Cisco Systems, Inc. 4 - 11 IT Essentials II v2.0 - Lab 10.1.1 Copyright  2002, Cisco Systems, Inc. Step 2 After Linux is loaded, the user will be prompted to login. During the installation process, the Command-Line Interface (CLI) was set as the default boot. The screen below shows a CLI login prompt. The Linux administrator account is called the root account. Type in root and press the Enter key. Be careful when typing because like all UNIX computers, Linux is case sensitive. Next, type in root’s password: cisco1 Note: the root account is signified by the # at the prompt. 5 - 11 IT Essentials II v2.0 - Lab 10.1.1 Copyright  2002, Cisco Systems, Inc. Step 3 It is not a good practice to work as the root user. The root user has complete control of the Linux system and can inadvertently delete important files. It is better to work as a user that does not have total control and to switch to the root account only when maintaining or upgrade the system. In Linux, it is a simple process to switch users by using the su command. During the installation process two accounts were created. One account was for the root account and another for general student use. Students will need to ask the instructor for the student account name. At the command prompt, type: su - studentA1 Note: When root users are switching users they will not be prompted for a password. All other accounts will be prompted for a password. Did the command prompt change? How? __________________________________________________________________ __________________________________________________________________ __________________________________________________________________ Note: the “–“ after the su command is called a switch. When switching users, this switch will run all associated user scripts. To experiment, type exit after logging in as any user other than the root user. The user will end up back as the root user. Now type: su studentA1 This time without the “–“ switch. What happened? Did the user end up in studentA1’s home directory? 6 - 11 IT Essentials II v2.0 - Lab 10.1.1 Copyright  2002, Cisco Systems, Inc. Step 4 Make sure to be logged on as a student user. To verify this, use the whoami command. The whoami command will only display the login name of the current user. At the command prompt type in: whoami What were the results? __________________________________________________________________ __________________________________________________________________ __________________________________________________________________ 7 - 11 IT Essentials II v2.0 - Lab 10.1.1 Copyright  2002, Cisco Systems, Inc. Step 5 Navigating the Command-Line Interface (CLI) is not difficult if the user knows where to find help. In Linux, the man command displays information about CLI commands. For example, to learn about the ls command type in: man ls Results of the man ls command To move around the man screen, click the Enter key to move down. Like DOS, Linux commands may have switches associated with them. Note that the ls command uses many switches, -a and –l are the most common. To exit the man command, type the letter: q The user will return to the CLI. 8 - 11 IT Essentials II v2.0 - Lab 10.1.1 Copyright  2002, Cisco Systems, Inc. Step 6 At the CLI, type in the following commands. Describe the results after each command is entered: ls ls –a ls –al How are files hidden in Linux? __________________________________________________________________ __________________________________________________________________ __________________________________________________________________ Hint: What character does Linux place in front of the file to hide it? __________________________________________________________________ __________________________________________________________________ Step 7 In this step, using the shutdown command will turn off the computer. Linux, like all NOSs, must complete the shut down process. Linux needs time to shutdown so it can put files where they belong. Turning off a Linux system quickly can result in files being lost and the corruption of vital configuration settings. To learn about the shutdown command, type in: man shutdown 9 - 11 IT Essentials II v2.0 - Lab 10.1.1 Copyright  2002, Cisco Systems, Inc. From this man page, briefly describe the shutdown command. __________________________________________________________________ __________________________________________________________________ __________________________________________________________________ What does the –r switch do? __________________________________________________________________ __________________________________________________________________ What does the –h switch do? __________________________________________________________________ __________________________________________________________________ How is the time set with the shutdown command? __________________________________________________________________ __________________________________________________________________ 10 - 11 IT Essentials II v2.0 - Lab 10.1.1 Copyright  2002, Cisco Systems, Inc. What letter would you type to exit the man help screen? __________________________________________________________________ __________________________________________________________________ Step 8 Only the root user is allowed to shutdown a Linux computer. To complete this step, verify that the user is logged in as the root user. If not, type: su – root If requested, enter the root password. Next, type: shutdown –h now Describe the shutdown process. __________________________________________________________________ __________________________________________________________________ After the shutdown process was complete, did the computer turn off? Note: With an ATX power supply it will turn the computer off. Older AT boxes will not. Troubleshooting IT professionals are frequently called on to troubleshoot Linux log-in problems. The following list can be used as a checklist when troubleshooting: Problem: Cannot log in to the system Possible causes: [...]...• Username or password is misspelled or mistyped Check both the username and password and carefully re-enter this information In both Linux and UNIX, usernames and passwords are case-sensitive, so verify that the password uses the correct case • Keyboard Caps Lock is on Press the Caps Lock key once, verify that the keyboard Caps Lock... and try entering the password again • User has confused username with password Verify that the user is typing his or her username in the “User name” field, and password in the “Password” field • When logging in through CLI, some users do not realize that although they do not see anything being entered as they type, the system is taking the input So it is sometimes common for beginning users to think . Systems, Inc. Lab 10.1.1: Logging Into Linux Estimated Time: 30 minutes Objective In this lab, the student will learn how to boot a Linux computer, log in. with Linux Red Hat 7.2 installed Scenario The student will boot up the Linux computer and log in using the root user account. The student will run Linux

Ngày đăng: 21/12/2013, 19:15

TỪ KHÓA LIÊN QUAN

w