@@ -26,7 +26,7 @@ your behalf in the supported region that's nearest to you:
26
26
- Storage account: ` cs<uniqueGuid> `
27
27
- fileshare: ` cs-<user>-<domain>-com-<uniqueGuid> `
28
28
29
- ![ Screenshot of choosing the subscription for your storage account] [ 09 ]
29
+ ![ Screenshot of choosing the subscription for your storage account. ] [ 06 ]
30
30
31
31
The fileshare mounts as ` clouddrive ` in your ` $HOME ` directory. This is a one-time action, and the
32
32
fileshare mounts automatically in subsequent sessions.
@@ -47,9 +47,9 @@ and zone-redundant storage (ZRS) accounts.
47
47
> [ !NOTE]
48
48
> Using GRS or ZRS storage accounts are recommended for additional resiliency for your backing file
49
49
> share. Which type of redundancy depends on your goals and price preference.
50
- > [ Learn more about replication options for Azure Storage accounts] [ 04 ] .
50
+ > [ Learn more about replication options for Azure Storage accounts] [ 03 ] .
51
51
52
- ![ Screenshot of configuring your storage account] [ 08 ]
52
+ ![ Screenshot of configuring your storage account. ] [ 05 ]
53
53
54
54
## Securing storage access
55
55
@@ -102,7 +102,7 @@ of their fileshare.
102
102
103
103
Storage accounts that you create in Cloud Shell are tagged with
104
104
` ms-resource-usage:azure-cloud-shell ` . If you want to disallow users from creating storage accounts
105
- in Cloud Shell, create an [ Azure resource policy for tags] [ 03 ] that is triggered by this specific
105
+ in Cloud Shell, create an [ Azure resource policy for tags] [ 02 ] that is triggered by this specific
106
106
tag.
107
107
108
108
## How Cloud Shell storage works
@@ -128,7 +128,7 @@ Cloud Shell persists files through both of the following methods:
128
128
In Cloud Shell, you can run a command called ` clouddrive ` , which enables you to manually update the
129
129
fileshare that's mounted to Cloud Shell.
130
130
131
- ![ Screenshot of running the clouddrive command in bash] [ 10 ]
131
+ ![ Screenshot of running the clouddrive command in bash. ] [ 07 ]
132
132
133
133
### List ` clouddrive `
134
134
@@ -172,7 +172,7 @@ clouddrive mount -s mySubscription -g myRG -n storageAccountName -f fileShareNam
172
172
173
173
To view more details, run ` clouddrive mount -h ` , as shown here:
174
174
175
- ![ Screenshot of running the clouddrive mount command in bash] [ 11 ]
175
+ ![ Screenshot of running the clouddrive mount command in bash. ] [ 12 ]
176
176
177
177
### Unmount clouddrive
178
178
@@ -187,7 +187,7 @@ The unmounted fileshare continues to exist until you manually delete it. After u
187
187
Shell no longer searches for this fileshare in subsequent sessions. To view more details, run
188
188
` clouddrive unmount -h ` , as shown here:
189
189
190
- ![ Screenshot of running the clouddrive unmount command in bash] [ 12 ]
190
+ ![ Screenshot of running the clouddrive unmount command in bash. ] [ 13 ]
191
191
192
192
> [ !WARNING]
193
193
> Although running this command doesn't delete any resources, manually deleting a resource group,
@@ -201,7 +201,7 @@ Shell no longer searches for this fileshare in subsequent sessions. To view more
201
201
The ` Get-CloudDrive ` cmdlet retrieves the Azure fileshare information currently mounted by the
202
202
` clouddrive ` in Cloud Shell.
203
203
204
- ![ Screenshot of running the Get-CloudDrive command in PowerShell] [ 07 ]
204
+ ![ Screenshot of running the Get-CloudDrive command in PowerShell. ] [ 11 ]
205
205
206
206
### Unmount ` clouddrive `
207
207
@@ -212,54 +212,76 @@ Dismounting the `clouddrive` terminates the current session.
212
212
If the Azure fileshare has been removed, you'll be prompted to create and mount a new Azure
213
213
fileshare in the next session.
214
214
215
- ![ Screenshot of running the Dismount-CloudDrive command in PowerShell] [ 06 ]
215
+ ![ Screenshot of running the Dismount-CloudDrive command in PowerShell. ] [ 08 ]
216
216
217
217
## Transfer local files to Cloud Shell
218
218
219
219
The ` clouddrive ` directory syncs with the Azure portal storage blade. Use this blade to transfer
220
220
local files to or from your file share. Updating files from within Cloud Shell is reflected in the
221
221
file storage GUI when you refresh the blade.
222
222
223
- ### Download files
223
+ ### Download files from the Azure portal
224
+
225
+ ![ Screenshot listing local files in the Azure portal.] [ 09 ]
224
226
225
- ![ Screenshot listing local files in the Azure portal] [ 13 ]
226
227
1 . In the Azure portal, go to the mounted file share.
227
- 2 . Select the target file.
228
- 3 . Select the ** Download** button.
228
+ 1 . Select the target file.
229
+ 1 . Select the ** Download** button.
230
+
231
+ ### Download files in Azure Cloud Shell
232
+
233
+ 1 . In an Azure Cloud Shell session, select the ** Upload/Download files** icon and select the
234
+ ** Download** option.
235
+ 1 . In the ** Download a file** dialog, enter the path to the file you want to download.
236
+
237
+ ![ Screenshot of the download dialog box in Cloud Shell.] [ 10 ]
238
+
239
+ You can only download files located under your ` $HOME ` folder.
240
+ 1 . Click the ** Download** button.
229
241
230
242
### Upload files
231
243
232
- ![ Screenshot showing how to upload files in the Azure portal] [ 14 ]
244
+ ![ Screenshot showing how to upload files in the Azure portal.] [ 14 ]
245
+
233
246
1 . Go to your mounted file share.
234
- 2 . Select the ** Upload** button.
235
- 3 . Select the file or files that you want to upload.
236
- 4 . Confirm the upload.
247
+ 1 . Select the ** Upload** button.
248
+ 1 . Select the file or files that you want to upload.
249
+ 1 . Confirm the upload.
237
250
238
251
You should now see the files that are accessible in your ` clouddrive ` directory in Cloud Shell.
239
252
240
253
> [ !NOTE]
241
254
> If you need to define a function in a file and call it from the PowerShell cmdlets, then the
242
255
> dot operator must be included. For example: ` . .\MyFunctions.ps1 `
243
256
257
+ ### Upload files in Azure Cloud Shell
258
+
259
+ 1 . In an Azure Cloud Shell session, select the ** Upload/Download files** icon and select the
260
+ ** Upload** option.
261
+ 1 . Your browser will open a file dialog. Select the file you want to upload then click the ** Open**
262
+ button.
263
+
264
+ The file is uploaded to the root of your ` $HOME ` folder. You can move the file after it's uploaded.
265
+
244
266
## Next steps
245
267
246
268
- [ Cloud Shell Quickstart] [ 15 ]
247
- - [ Learn about Microsoft Azure Files storage] [ 05 ]
248
- - [ Learn about storage tags] [ 02 ]
269
+ - [ Learn about Microsoft Azure Files storage] [ 04 ]
270
+ - [ Learn about storage tags] [ 01 ]
249
271
250
272
<!-- link references -->
251
- [ 01 ] : includes/cloud-shell-persisting-shell-storage-endblock .md
252
- [ 02 ] : ../azure-resource-manager/management/tag-resources .md
253
- [ 03 ] : ../governance/policy/samples/index .md
254
- [ 04 ] : ../storage/common /storage-redundancy .md
255
- [ 05 ] : ../ storage/files/storage-files-introduction.md
256
- [ 06 ] : media/persisting-shell-storage/dismount-clouddrive .png
257
- [ 07 ] : media/persisting-shell-storage/get- clouddrive.png
258
- [ 08 ] : media/persisting-shell-storage/advanced-storage .png
259
- [ 09 ] : media/persisting-shell-storage/basic-storage .png
260
- [ 10 ] : media/persisting-shell-storage/clouddrive-h .png
261
- [ 11 ] : media/persisting-shell-storage/mount-h .png
262
- [ 12 ] : media/persisting-shell-storage/unmount -h.png
263
- [ 13 ] : media/persisting-shell-storage/download .png
264
- [ 14 ] : media/persisting-shell-storage/upload.png
273
+ [ 01 ] : ../azure-resource-manager/management/tag-resources .md
274
+ [ 02 ] : ../governance/policy/samples/index .md
275
+ [ 03 ] : ../storage/common/storage-redundancy .md
276
+ [ 04 ] : ../storage/files /storage-files-introduction .md
277
+ [ 05 ] : media/persisting-shell- storage/advanced-storage.png
278
+ [ 06 ] : media/persisting-shell-storage/basic-storage .png
279
+ [ 07 ] : media/persisting-shell-storage/clouddrive-h .png
280
+ [ 08 ] : media/persisting-shell-storage/dismount-clouddrive .png
281
+ [ 09 ] : media/persisting-shell-storage/download-portal .png
282
+ [ 10 ] : media/persisting-shell-storage/download-shell .png
283
+ [ 11 ] : media/persisting-shell-storage/get-clouddrive .png
284
+ [ 12 ] : media/persisting-shell-storage/mount -h.png
285
+ [ 13 ] : media/persisting-shell-storage/unmount-h .png
286
+ [ 14 ] : media/persisting-shell-storage/upload-portal .png
265
287
[ 15 ] : quickstart.md
0 commit comments