您的位置:首页 > 运维架构 > Linux

LESSON 2 BASIC COMMANDS IN LINUX AND WINDOWS (LINUX 和 WINDOWS的基本命令) part IV

2010-08-01 19:39 453 查看
Basic command equivalences for Windows/Linux

This is a table showing the basic command equivalences between Linux and Windows.
Commands are executed from a shell (in Linux) or from a MS-DOS window (in Windows).

Windows和Linux系统功能等价的命令:

下面这张表整理了Linux和Windows系统功能等价的指令。

Linux通过控制台窗口执行这些命令,Windows通过MS-DOS执行这些命令。

Linux Windows

command --help command /h, command /?
man command help command
cp copy
rm del
mv move
mv ren
more, less, cat type
lpr print
rm -R deltree
ls dir
cd cd
mkdir md
rmdir rd
route route print
traceroute –I tracert
ping ping
ifconfig ipconfig

2.5. Exercises

2.5.1 Exercises in Windows

1. Go to a MS-DOS window.
2. Identify the version of MS-DOS that you are using. What version have you detected? What
command have you used?.
3. Identify the date and time of the system. If they are incorrect, modify them so that they are
correct. What command have you used?
4. Identify all the directories and files that are in “c:/”. What command have you used?
5. Create the directory c:/hhs/lesson0. Copy in this directory all the files with the extension
“.sys” that are in “c:/”. What files have you found? What commands have you used?
6. Identify the IP address of your host. What command have you used? What IP address do
you have?
7. Trace the route to “www.google.com”. Identify IPs of the intermediate routers.

2.5. 练习

2.5.1 Windows练习题

1. 运行MS-DOS。

2. 查出你使用的MS-DOS版本。你发现你使用的是什么版本?你使用的哪条指令查出来的?

3. 查出系统日期和时间。如果他们是错误的,更改日期和时间,你使用的是哪条指令?

4. 查出c盘中所有的文件夹和文件。你使用的是哪条指令?

5. 新建文件夹c:/hhs/lesson0。将c盘中所有的后缀名为“.sys”的文件拷贝到该文件夹中,你

找到哪些文件?你使用的是哪条指令?

6. 查出你主机的IP地址,你使用的是哪条指令?你主机地址是什么?

7. 跟踪 “www.google.com”路由。查出中途跳转机的IP地址。

2.5.2 Exercises in Linux
1. Identify the owner of the file “passwd”. (Note: first locate where this file is). What command
have you used?
2. Create the directory “work” in your own home directory (for example, if your login is
“mylogin”, create the directory in “/home/mylogin”), and copy the file “passwd” in the
directory “work” that you have just created. Identify the owner of the file “passwd” that has
been copied.
3. Create the directory “.hide” in the “work” directory. List the contents of this directory. What
did you have to do to see the contents of directory ".hide"?
4. Create the file “test1” with the content “This is the content of the file test1” in the “work”
directory. Create the file “test2” with the content “This is the content of the file test2” in the
“work” directory. Copy into a file with the name "test” the contents of previous files. What
commands have you used?
5. Identify the name and the IP address of your machine. What commands have you used?
What IP address do you have?
6. Trace the route to “www.google.com”. Identify IPs of the intermediate routers.

2.5.2 Linux练习题

1. 查出文件 “passwd”的所有者。(说明:先找出该文件存放的位置)。你使用的是哪条指令?

2. 在根目录文件夹下新建文件夹“work”(例如:如果你的登录名是“mylogin”, 将新建文件夹存放在

“/home/mylogin”), 同时将文件''passwd''拷贝到新建文件夹中。重新查出passwd的所有者。

3. 在“work”文件夹中新建文件夹“.hide” 。将该文件夹的内容列出来。你要怎样使这个文件夹的内容

显示出来呢?

4. 在"work"文件夹中新建内容"This is the content of the file test1"的文件"test2"。将该文件中的

内容复制到文件"test"中。你使用的是哪条指令?

5. 查出你主机的名字和IP地址。你使用的是哪条指令?你的IP地址是什么呢?

6. 跟踪 “www.google.com”路由。查出中途跳转机的IP地址。

2.5.3 Exercise 3
Complete the following table with parallelisms between Windows and Linux. For
example: the Linux command “command -help” is equivalent to the Windows

command “command /h”. As another example, in Linux: “cp” is just like the Windows
command, “copy”.

2.5.3 练习 3

用Windows和Linux功能相同的指令完成下列表格。例如:Linux指令"command -help"和Windows

指令"command /h"功能相同。另一个指令,在Linux中,”cp”和Windows中的“copy”功能相同。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: