1
00:00:00,000 --> 00:00:00,833
In this lesson,

2
00:00:00,833 --> 00:00:04,650
we're going to go over how to uniquely identify our USB drive.

3
00:00:04,650 --> 00:00:07,980
Now, I went ahead and went to the VirtualBox manager,

4
00:00:07,980 --> 00:00:09,840
just in case anybody has any issues

5
00:00:09,840 --> 00:00:13,620
with having the virtual machine recognize the device.

6
00:00:13,620 --> 00:00:14,651
So what you're going to do

7
00:00:14,651 --> 00:00:17,025
is you're go to the properties up here,

8
00:00:17,025 --> 00:00:19,080
I want you select the virtual machine you're using,

9
00:00:19,080 --> 00:00:20,273
and then you can go to USB,

10
00:00:21,223 --> 00:00:23,250
then you're going to use this green plus sign.

11
00:00:23,250 --> 00:00:25,860
It's going to add particular device,

12
00:00:25,860 --> 00:00:28,233
so just locate your USB device,

13
00:00:29,940 --> 00:00:33,213
and then we'll be able to connect it to the virtual machine.

14
00:00:34,500 --> 00:00:37,290
Now, once you have it plugged in,

15
00:00:37,290 --> 00:00:40,170
it might not be recognized initially once you get on there,

16
00:00:40,170 --> 00:00:41,070
but if that's the issue,

17
00:00:41,070 --> 00:00:43,290
just unplug it and plug it back in

18
00:00:43,290 --> 00:00:45,363
and it should recognize it for you.

19
00:00:47,070 --> 00:00:49,410
So also just to make things a little easier,

20
00:00:49,410 --> 00:00:51,780
we can recognize the vendor ID,

21
00:00:51,780 --> 00:00:53,190
product ID and serial number

22
00:00:53,190 --> 00:00:55,020
that's going to be useful for us later.

23
00:00:55,020 --> 00:00:56,470
So let's hop right into this.

24
00:00:57,602 --> 00:00:58,620
So the first thing we're going to do

25
00:00:58,620 --> 00:01:00,430
it's going to use the lsblk command

26
00:01:01,380 --> 00:01:05,790
and it's going to identify the USB device.

27
00:01:05,790 --> 00:01:07,440
And again, you have to realize

28
00:01:07,440 --> 00:01:09,900
whenever is first loaded on there,

29
00:01:09,900 --> 00:01:12,000
the system gives it a generic name

30
00:01:12,000 --> 00:01:12,833
and we're trying to avoid it.

31
00:01:12,833 --> 00:01:17,700
So sdb, that's going to be the USB hard drive

32
00:01:17,700 --> 00:01:19,000
that I have connected now.

33
00:01:20,700 --> 00:01:24,090
And that's again, and I say it, sdb.

34
00:01:24,090 --> 00:01:27,420
So we're going to use the udev admin command.

35
00:01:27,420 --> 00:01:29,160
So the udev, that's the manager

36
00:01:29,160 --> 00:01:31,290
for all the devices and hardware.

37
00:01:31,290 --> 00:01:33,240
So we're going to use this to get some information

38
00:01:33,240 --> 00:01:34,533
about that really quick.

39
00:01:36,720 --> 00:01:39,573
Use dev/sdb.

40
00:01:46,560 --> 00:01:48,930
Now we see it gives us a lot of detailed information

41
00:01:48,930 --> 00:01:50,910
about the device itself,

42
00:01:50,910 --> 00:01:52,530
we see it identified as sdb.

43
00:01:52,530 --> 00:01:54,210
So information's going to be particularly useful,

44
00:01:54,210 --> 00:01:56,400
it's going to be the ID serial number,

45
00:01:56,400 --> 00:01:58,800
so about five down from the bottom,

46
00:01:58,800 --> 00:02:02,100
iOS device flash drive.

47
00:02:02,100 --> 00:02:04,614
And it's going to be all zeros, HH31,

48
00:02:04,614 --> 00:02:06,264
it's going to be very useful for us.

49
00:02:07,500 --> 00:02:08,880
Scroll down a little bit,

50
00:02:08,880 --> 00:02:12,033
get the ID vendor ID.

51
00:02:18,990 --> 00:02:22,050
Now to get more specific attribute information,

52
00:02:22,050 --> 00:02:23,223
we use the -a symbol.

53
00:02:24,990 --> 00:02:27,090
And now this where we're get into the format

54
00:02:27,090 --> 00:02:28,980
that the files that we'll use

55
00:02:28,980 --> 00:02:31,440
to customize the unique identification,

56
00:02:31,440 --> 00:02:34,470
this is how it's going to identify these things.

57
00:02:34,470 --> 00:02:37,770
So that thing's going to be labeled in the ATTR

58
00:02:37,770 --> 00:02:40,083
type of manner once we're going through this.

59
00:02:41,190 --> 00:02:45,960
So again, this screen walks through each pairing device

60
00:02:45,960 --> 00:02:48,360
starting with the target device

61
00:02:48,360 --> 00:02:50,580
you read in instructions here,

62
00:02:50,580 --> 00:02:51,530
in the information.

63
00:02:54,780 --> 00:02:59,370
Again, a lot of just key information about the device.

64
00:02:59,370 --> 00:03:00,570
Now we'll get into the weeds

65
00:03:00,570 --> 00:03:02,220
about everything that's going on.

66
00:03:06,390 --> 00:03:07,860
So what we want to do is,

67
00:03:07,860 --> 00:03:09,810
let's try to look up the serial number.

68
00:03:11,580 --> 00:03:12,660
Remember, to search in this,

69
00:03:12,660 --> 00:03:15,120
we're going to do /serial,

70
00:03:15,120 --> 00:03:17,490
remember this is piped under the less command.

71
00:03:17,490 --> 00:03:20,583
So we found the serial number under attributes.

72
00:03:28,200 --> 00:03:29,500
This connected to the USB.

73
00:03:30,660 --> 00:03:31,770
And again, while we're on the screen

74
00:03:31,770 --> 00:03:33,630
we're going to look for the ID vendor,

75
00:03:33,630 --> 00:03:34,833
which is right here.

76
00:03:38,490 --> 00:03:40,833
And they're going to annotate the ID product,

77
00:03:43,530 --> 00:03:44,553
just right here.

78
00:03:47,973 --> 00:03:49,830
And we're just going to keep this window up

79
00:03:49,830 --> 00:03:51,840
'cause we're going to need it once we start configuring,

80
00:03:51,840 --> 00:03:54,060
it'll be a little easier that way.

81
00:03:54,060 --> 00:03:56,250
Next we're going to create a udev rule

82
00:03:56,250 --> 00:03:58,260
to automatically link the custom device name

83
00:03:58,260 --> 00:04:00,160
to the USB drive when it's plugged in.

84
00:04:01,530 --> 00:04:02,730
So we're going to use sudo.

85
00:04:10,377 --> 00:04:13,113
Now we're going to put all this on one line.

86
00:04:14,910 --> 00:04:16,890
See, I went ahead and typed this out

87
00:04:16,890 --> 00:04:19,230
just to make sure everything works properly,

88
00:04:19,230 --> 00:04:21,630
'cause this file is very sensitive.

89
00:04:21,630 --> 00:04:24,510
So make sure that you copy everything exactly.

90
00:04:24,510 --> 00:04:26,403
So you see how it says KERNELS here?

91
00:04:27,330 --> 00:04:28,290
1-1.

92
00:04:28,290 --> 00:04:33,290
So we go back, so that's the one,

93
00:04:33,360 --> 00:04:35,133
kernals 1-1,

94
00:04:36,090 --> 00:04:38,733
ID vendor, 05e3,

95
00:04:45,870 --> 00:04:50,703
serial number, 00000000HH31,

96
00:04:53,640 --> 00:04:58,640
ID product here, 0738.

97
00:05:01,737 --> 00:05:04,620
And the symlink is what I want to name it,

98
00:05:04,620 --> 00:05:09,300
so again, this is what the system will recognize

99
00:05:09,300 --> 00:05:10,350
the device as,

100
00:05:10,350 --> 00:05:13,200
so instead of being sdb,

101
00:05:13,200 --> 00:05:15,873
it's going to be myHDD,

102
00:05:16,740 --> 00:05:20,070
that's what we're going to recognize it on the system.

103
00:05:20,070 --> 00:05:22,590
Now all of this is going to be on one line,

104
00:05:22,590 --> 00:05:23,883
so if you see down here,

105
00:05:24,780 --> 00:05:25,743
it's one line,

106
00:05:26,580 --> 00:05:28,320
so type in directly,

107
00:05:28,320 --> 00:05:30,283
going to be KERNELS==,

108
00:05:32,130 --> 00:05:35,520
type in the name that you have for your particular device,

109
00:05:35,520 --> 00:05:38,913
comma space attributes, ATTRS,

110
00:05:40,110 --> 00:05:41,710
and then use the curly brackets,

111
00:05:42,600 --> 00:05:43,433
then you'll start putting in

112
00:05:43,433 --> 00:05:45,003
the attribute names,

113
00:05:45,003 --> 00:05:47,253
==, and then so on and so forth.

114
00:05:48,690 --> 00:05:51,753
Just make sure you go very slow what you're typing.

115
00:05:56,867 --> 00:05:58,230
Let's go over here.

116
00:05:58,230 --> 00:05:59,760
Now once you have that complete,

117
00:05:59,760 --> 00:06:04,760
what you want to do is use the sudo udev admin control

118
00:06:08,100 --> 00:06:12,183
under reload rules.

119
00:06:14,250 --> 00:06:17,010
Now it usually reloads the rules automatically

120
00:06:17,010 --> 00:06:19,920
but again, we just want to make sure everything is done.

121
00:06:19,920 --> 00:06:23,853
So the next one we'll use is udev admin trigger.

122
00:06:26,160 --> 00:06:30,330
Now the trigger rules also is done when it's connected,

123
00:06:30,330 --> 00:06:32,962
but again, we want to ensure that

124
00:06:32,962 --> 00:06:34,980
once we unplug it and plug it back in

125
00:06:34,980 --> 00:06:36,380
that it's going to work for us.

126
00:06:37,860 --> 00:06:39,243
All right, click this out.

127
00:06:40,200 --> 00:06:42,933
Now we're going to go to our applications,

128
00:06:45,150 --> 00:06:46,473
our favorites files,

129
00:06:47,640 --> 00:06:50,133
and we're going to unmount this first,

130
00:06:51,810 --> 00:06:52,910
we're going to unplug it.

131
00:06:56,430 --> 00:06:57,263
Plug it back in.

132
00:07:04,740 --> 00:07:08,313
So now when we go to our lsblock,

133
00:07:10,530 --> 00:07:12,120
we should be able to find this directly,

134
00:07:12,120 --> 00:07:16,877
'cause you know I can use dev and just say sda, right?

135
00:07:18,060 --> 00:07:19,920
We're going to be able to do the same thing,

136
00:07:19,920 --> 00:07:24,000
but it's going to be myHDD.

137
00:07:24,000 --> 00:07:25,260
So we see now

138
00:07:25,260 --> 00:07:30,260
that we can associate a specific type of name

139
00:07:30,570 --> 00:07:32,250
to instead of sdb1,

140
00:07:32,250 --> 00:07:34,650
it's going to be myHDD.

141
00:07:34,650 --> 00:07:37,650
So whenever we're looking for unique type of information

142
00:07:37,650 --> 00:07:39,990
again, serial numbers or whatever,

143
00:07:39,990 --> 00:07:43,860
it's all going to be associated with myHDD.

144
00:07:43,860 --> 00:07:44,693
But you have to realize

145
00:07:44,693 --> 00:07:47,190
there's so many different USB devices,

146
00:07:47,190 --> 00:07:49,620
and when they're connected to different machines,

147
00:07:49,620 --> 00:07:51,930
in order to uniquely identify them,

148
00:07:51,930 --> 00:07:54,116
instead of having to always look up the serial number

149
00:07:54,116 --> 00:07:55,980
or the product ID,

150
00:07:55,980 --> 00:07:57,900
you can just use as myHDD,

151
00:07:57,900 --> 00:07:59,220
or whatever you want to call it,

152
00:07:59,220 --> 00:08:01,650
install, Sarah's hard drive,

153
00:08:01,650 --> 00:08:03,180
whatever it is,

154
00:08:03,180 --> 00:08:04,440
this is where you would do it.

155
00:08:04,440 --> 00:08:06,270
Now, it's not a common practice,

156
00:08:06,270 --> 00:08:08,790
but it's something that we should be familiar with.

157
00:08:08,790 --> 00:08:10,080
Another way to make sure that

158
00:08:10,080 --> 00:08:12,930
the symbolic link was correctly captured,

159
00:08:12,930 --> 00:08:17,670
is if you start the dev and scroll up,

160
00:08:21,570 --> 00:08:25,890
you'll see right here, myHDD,

161
00:08:25,890 --> 00:08:28,713
again, it's pointing to sdb1.

162
00:08:29,880 --> 00:08:31,890
Next, we're going to walk through how to

163
00:08:31,890 --> 00:08:34,470
install a virtual printer.

164
00:08:34,470 --> 00:08:38,100
Now, the system that we're going to use to do is called CUPS.

165
00:08:38,100 --> 00:08:40,530
CUPS is a print management system for Linux

166
00:08:40,530 --> 00:08:43,350
that enables a computer to function as a print server.

167
00:08:43,350 --> 00:08:45,420
So the first thing we want to do is,

168
00:08:45,420 --> 00:08:47,910
we're actually going to go to the GUI,

169
00:08:47,910 --> 00:08:49,470
and we want to take a list of the printers,

170
00:08:49,470 --> 00:08:50,970
just to verify that there's no printers

171
00:08:50,970 --> 00:08:53,130
actually currently present.

172
00:08:53,130 --> 00:08:54,213
Go to application,

173
00:08:55,200 --> 00:08:56,493
in system tools,

174
00:08:59,880 --> 00:09:00,993
go to the settings.

175
00:09:03,810 --> 00:09:05,973
Scroll to the bottom, under devices,

176
00:09:07,350 --> 00:09:08,880
go to printers here.

177
00:09:08,880 --> 00:09:10,680
And we can see we don't have anything installed.

178
00:09:10,680 --> 00:09:12,180
So we're going to change that really quick

179
00:09:12,180 --> 00:09:14,013
by installing a virtual PDF printer.

180
00:09:16,500 --> 00:09:17,820
So with this command,

181
00:09:17,820 --> 00:09:20,010
we're going to use the yum package manager,

182
00:09:20,010 --> 00:09:23,460
and this is going to allow us to install the package,

183
00:09:23,460 --> 00:09:26,010
so we have to download it from the external repository.

184
00:09:26,010 --> 00:09:29,124
So we're going to just go ahead and click enter here.

185
00:09:29,124 --> 00:09:31,620
And this is a well known error with this,

186
00:09:31,620 --> 00:09:34,249
so we might have to actually do this twice

187
00:09:34,249 --> 00:09:36,723
for it to fully go through with this,

188
00:09:37,573 --> 00:09:39,673
just to make sure everything went through.

189
00:09:50,460 --> 00:09:52,620
Now let's go back to the settings here,

190
00:09:52,620 --> 00:09:54,300
and now we can see that the CUPS PDF

191
00:09:54,300 --> 00:09:55,653
is ready for print for us.

192
00:09:56,520 --> 00:09:59,250
Now we need to make this our default printer,

193
00:09:59,250 --> 00:10:00,850
so we're going to unlock this here.

194
00:10:03,210 --> 00:10:04,590
Enter our password.

195
00:10:04,590 --> 00:10:06,000
Let's just move the screen over a little bit

196
00:10:06,000 --> 00:10:08,820
so we can see the settings.

197
00:10:08,820 --> 00:10:10,140
We can go to settings,

198
00:10:10,140 --> 00:10:12,040
and we'll use this printer by default.

199
00:10:20,640 --> 00:10:21,940
Next thing we're going to do,

200
00:10:22,890 --> 00:10:25,140
going to use the lpr command,

201
00:10:25,140 --> 00:10:27,870
which is pretty much, it's a print command,

202
00:10:27,870 --> 00:10:31,210
and we're going to use our computer list file

203
00:10:33,330 --> 00:10:35,043
that we used earlier,

204
00:10:36,270 --> 00:10:39,090
and this going to default and send it to our desktop.

205
00:10:39,090 --> 00:10:41,193
So we should be able to go to desktop now,

206
00:10:42,319 --> 00:10:44,943
and we can see the PDF version of that file here.

207
00:10:48,510 --> 00:10:50,210
So that was very quick, very easy.

208
00:10:51,090 --> 00:10:55,200
We just went over how to install a virtual PDF printer,

209
00:10:55,200 --> 00:10:57,469
and also how to customize how Linux recognizes

210
00:10:57,469 --> 00:11:00,300
our external USB devices.

211
00:11:00,300 --> 00:11:01,650
Thank you for sticking through this walkthrough,

212
00:11:01,650 --> 00:11:03,450
and I'll see you in the next lesson.

