1
00:00:00,000 --> 00:00:07,000
In this example, I’m in router mode and if I type the command password cisco

2
00:00:07,000 --> 00:00:10,000
notice the router is not accepting the command

3
00:00:10,000 --> 00:00:16,000
because I should be in console 0 mode and not router mode.

4
00:00:16,000 --> 00:00:18,000
So correct command, wrong mode.

5
00:00:18,000 --> 00:00:23,000
So I need to go to the line console and then I’ll be able to type the command

6
00:00:23,000 --> 00:00:27,000
password cisco and the router will accept the command.

7
00:00:27,000 --> 00:00:32,000
Auto completion of commands is done when you use the tab key,

8
00:00:32,000 --> 00:00:35,000
you don’t have to autocomplete a command.

9
00:00:35,000 --> 00:00:40,000
You could simply use the abbreviated command but if you wanna see the full command

10
00:00:40,000 --> 00:00:44,000
then hit the tab key for the router or switch and auto complete the command.

11
00:00:44,000 --> 00:00:49,000
So in this example I’m gonna type conf tab, t tab

12
00:00:49,000 --> 00:00:51,000
notice the auto completion.

13
00:00:51,000 --> 00:00:57,000
If I type rou I’m only gonna be shown route, so the additional te

14
00:00:57,000 --> 00:01:00,000
because there are 2 matching values, route map and router.

15
00:01:00,000 --> 00:01:05,000
So if I type the r tab notice the space is added

16
00:01:05,000 --> 00:01:08,000
and now I can specify the routing protocol.

17
00:01:08,000 --> 00:01:15,000
So let’s choose o for OSPF, it's not accepted because I have odr in OSPF

18
00:01:15,000 --> 00:01:23,000
so I'm going to say OS tab and now notice I get OSPF and question mark

19
00:01:23,000 --> 00:01:27,000
multiple options, so tab doesn’t work, any t tab does work because

20
00:01:27,000 --> 00:01:30,000
I now have a unique value, tab wouldn’t work in this example because

21
00:01:30,000 --> 00:01:39,000
I have to specify a network value and the router wouldn’t know what that network is

22
00:01:39,000 --> 00:01:43,000
but if I say a at this point, it knows that, that's area.

23
00:01:43,000 --> 00:01:48,000
so use tab to autocomplete a command if you want to

24
00:01:48,000 --> 00:01:53,000
it’s not absolutely required, you could just use abbreviated commands

25
00:01:53,000 --> 00:01:57,000
so you'll often see that network engineers will just type conf t router

26
00:01:57,000 --> 00:02:07,000
OSPF 1 network 10.0.0.0 with the mask area 0 and router will accept those commands.

27
00:02:07,000 --> 00:02:10,000
So to see the running config as an example, just type sh run

28
00:02:10,000 --> 00:02:15,000
don’t type the full show running config command options

29
00:02:15,000 --> 00:02:19,000
abbreviated command, will save you a lot of time in the real world.

30
00:02:19,000 --> 00:02:23,000
There's also a command history buffer which allows you to re-enter commands

31
00:02:23,000 --> 00:02:30,000
that you type earlier, so if I type show history I can see a list of commands in this mode.

32
00:02:30,000 --> 00:02:33,000
Go to global config mode, press up key

33
00:02:33,000 --> 00:02:37,000
notice different commands are available in this mode.

34
00:02:37,000 --> 00:02:40,000
So I can see the various commands that I use there

35
00:02:40,000 --> 00:02:44,000
So just to show you the key sequence options, show history

36
00:02:44,000 --> 00:02:50,000
shows me the commands in this mode, ctrl-p, ctrl-p, ctrl-p

37
00:02:50,000 --> 00:02:57,000
and I'll do up key, notice it’s cycling through the various commands that I typed

38
00:02:57,000 --> 00:03:03,000
now do Ctrl-n, Ctrl-n, down key, down arrow key

39
00:03:03,000 --> 00:03:05,000
notice its cycling back through the history.

40
00:03:05,000 --> 00:03:10,000
So up or down keys, take me through the history in different directions.

41
00:03:10,000 --> 00:03:15,000
You can also use ctrl-p for the previous command or ctrl-n for the next command

42
00:03:15,000 --> 00:03:18,000
in some cases you would have to use that

43
00:03:18,000 --> 00:03:24,000
if the keyboard or terminal doesn’t recognize the up and down arrow keys.

44
00:03:24,000 --> 00:03:27,000
Don’t forget some of the shortcut commands available to you

45
00:03:27,000 --> 00:03:31,000
so Ctrl-a takes me to the beginning of the line.

46
00:03:31,000 --> 00:03:33,000
In this case delete is not being accepted

47
00:03:33,000 --> 00:03:38,000
so I can use Ctrl-d for deletion of a character

48
00:03:38,000 --> 00:03:42,000
so that’s a good example, let me type a command, this is a test

49
00:03:42,000 --> 00:03:46,000
backspace, get rid of characters as you would expect.

50
00:03:46,000 --> 00:03:50,000
This is a test Ctrl-a takes me to the beginning.

51
00:03:50,000 --> 00:03:54,000
In my example the delete key is not accepted on this keyboard

52
00:03:54,000 --> 00:03:57,000
so I can press the Ctrl-d to delete a key.

53
00:03:57,000 --> 00:04:00,000
ctrl-e takes me to the end of the line

54
00:04:00,000 --> 00:04:05,000
so here’s the en Ctrl-a  beginning of line

55
00:04:05,000 --> 00:04:08,000
so Ctrl-a  to the beginning, Ctrl-e to the end.

56
00:04:08,000 --> 00:04:15,000
Left arrow key takes me to the left one character, right arrow to the right one character.

57
00:04:15,000 --> 00:04:19,000
there are a lot of other shortcuts in the CLI

58
00:04:19,000 --> 00:04:22,000
here I’m doing Ctrl-b take me to the left one character

59
00:04:22,000 --> 00:04:27,000
Ctrl-f forward 1 character which you would need to use

60
00:04:27,000 --> 00:04:32,000
if for example the keyboard didn’t support left and right arrow keys.

61
00:04:32,000 --> 00:04:36,000
Those are the basic commands, there are many other shortcuts that you can use

62
00:04:36,000 --> 00:04:39,000
refer to the Cisco documentation for more information

63
00:04:39,000 --> 00:04:43,000
but those are enough to get you started and if you’ve got access to our labs

64
00:04:43,000 --> 00:04:48,000
we'll look at more options and you can tests this on real equipment.
