decal
Detailed tutorial to Guo Daxia
Experiment 1 Linux Basic Environment_Re: Code Life Blog from Scratch - CSDN Blog
"Operating System" Experiment Report
Name |
Rhyme_7 |
student ID |
7777777 |
|
Experiment number |
experiment one |
experiment name |
Linux basic environment |
|
Purpose |
1. Familiar with the basic operations under Linux, learn to use various shell commands to operate Linux, and have a perceptual understanding of Linux. 2. Learn to use the vi editor to edit simple C language programs, and be able to compile and debug them. |
|||
Experimental content |
||||
Experiment Topics ( 1 ) |
Complete the login of the LINUX system and start the terminal |
|||
Experiment code, experiment process (snapshot in interface mode), experiment result (snapshot) |
||||
Experimental experience (what problems encountered and how to solve them) |
The root of the new virtual machine cannot log in without setting a password. You need sudo passwd root to set a password for root before you can log in. Ubuntu uses root to log in for the first time - Programmer Sought In addition, tools cannot be installed directly. The option to install VMware Tools in VMware is grayed out and cannot be installed_Rhyme_7's Blog-CSDN Blog |
|||
Experimental topic ( 2 ) |
Select the appropriate basic common command, perform the following operations and record the results |
|||
Experiment code, experiment process (snapshot in interface mode), experiment result (snapshot) |
1) Run the pwd command to determine your current working directory; 2) Display the contents of the current working directory; 3) Use long format to display all files; 4) List the details of all directories and files under the /bin directory, sorted by modification time; 5) Use the mkdir command to create a subdirectory subdir 6) Change the working directory to the root directory (/). |
|||
Experimental experience (what problems encountered and how to solve them) |
Operations such as creating a directory require certain permissions, which can be performed under the root user, or can be granted to ordinary users. |
|||
Experiment Topics ( 3 ) |
Check your files under LINUX . |
|||
Experiment code, experiment process (snapshot in interface mode), experiment result (snapshot) |
1) Change the working directory to your home directory. 2) Store the current date and time in the new file file1. (use the date parameter to display the current date and time) 3) View the content of the file1 file. 4) Create directories dir1 and dir2, and move dir1 to the directory of dir2. |
|||
Experimental experience (what problems encountered and how to solve them) |
Mastered the data> cat mkdir mv command |
|||
Experimental Topics ( 4 ) |
Write a C program that can output the " Hello world! " greeting , and compile and execute it in the terminal. Requires a record of the commands used and their results. |
Experiment code, experiment process (snapshot in interface mode), experiment result (snapshot) |
Install vim, gcc Use vim to write code and save Run after compiling with gcc |
Experimental experience (what problems encountered and how to solve them) |
My blog content ubuntu gcc header file error | install build-essential dependency error | manually change the source_Rhyme_7's Blog-CSDN Blog |
Experiment Topics ( 5 ) |
Familiar with the directory structure of the Linux system, use commands or write C language programs to report the behavior of the Linux kernel. (Refer to Appendix 2 ) |
Experiment code, experiment process (snapshot in interface mode), experiment result (snapshot) |
1) CPU type and model 2) Kernel version 3) How long has it been since the system was last booted? In the form dd:hh:mm:ss 4) The amount of memory currently configured 5) The current amount of available memory 6) The number of all interrupts that have occurred since the system was started 7) The number of processes created since system startup 8) The number of context switches performed by the kernel |
Experimental experience |