TITLE: [MUSIC]
KAYLA CINNAMON: Hey, everyone.
Welcome to the Windows Dev Box Setup Session.
My name is Kayla Cinnamon,
and I'm a program manager on
the Windows for Developers team.
We're the team who brought you Windows Terminal,
Windows subsystem for Linux,
PowerToys, Windows Package Manager, and
various improvements to the
developer workstream on Windows.
We come to work every day striving to
make Windows a great place for developers.
Today I'm going to show you how you can set up
your machine with our great set of
developer tools to help you get started
with a fantastic development environment.
Without further ado, let's get started.
Here on my machine, I'm on
the Windows Insider program Dev Channel,
which has Windows 11.
The first tool I want to use is Windows Package Manager.
I can install Windows Package Manager
by getting the App Installer
from the Microsoft store, and
then getting started in my command line from there.
Once this is installed,
I can go into my terminal, and I'm using
Windows Terminal,
which is now installed by default on Windows 11.
Then I can get started using winget.
The first tool that I want to
install is Visual Studio Code.
I'm going to maximize my terminal here,
get all set up, and then start
typing winget install vscode.
What this is going to do is I'm going
to speed up the installation a bit since this
is a demo, and then we're going to get started using
VS Code to start changing some settings in winget.
We're going to have this run,
and then once this is done installing,
I'm going to open the settings.
Winget has a JSON file where you
can change all the settings of
winget that are available to you,
so I can open that JSON file with winget settings.
This will open the settings on JSON file in VS Code,
and then I can get started changing
the settings that I like for winget.
You might notice here at the top there's
the schema line, and the schema
tells VS Code what settings are available to me.
Right here at the top, it's
actually referencing the schema from the web.
Whenever new settings are added,
this will be updated automatically.
What VS Code will do is it will give me a dropdown of
recommendations for settings that
I can set in my settings file.
My favorite setting that I love to
change is the progress bar.
I can start typing, and you'll see this dropdown,
this is all the settings I can use.
I'll go down to visual, and then once
I'm in visual I'll change the only visual setting,
which is the progress bar,
and I'm going to set it to rainbow.
I'm going to save this, and then I'll
go back into my terminal and
install the next tool to get started with my dev setup.
This next tool is PowerToys,
it is a fan favorite.
We love using it and
getting very productive with it on Windows.
I can do that by typing winget install powertoys
and then I'm actually going to add
an argument for the source,
that'll be -s msstore.
What's really great about winget is that you can
install packages from the Microsoft store as
well as packages from winget's package library,
and you can specify the source by
typing -s or source, and then typing msstore or winget.
Once this is installed,
we can get started using PowerToys as well.
Now I have all my tools installed,
and I want to be able to
export this package or
set of packages, and put it onto a new machine.
I can do that by typing winget export, and then
-o for the output file, and then I'm just going
to set it to packages.json.
Winget is going to take
all the packages I have installed in this machine,
write it in a JSON file format,
and then export it into this packages.json file,
which I can then take and put onto
a new machine, and run winget import.
Here the export function is running and then
I'm going to open that file with code.
Type in code packages.json opens that file in VS Code.
Then here you can see all the packages that I have
installed on the machine here, and then
I can take this and run winget import
and put it on to
a new machine and they get started right away.
I don't have to install each package by hand,
I can just export and then import this file in.
Winget is open source so if you'd like to
contribute to the CLI package repository,
manifest creator, or the rest-based source,
you can do so by heading over to
GitHub and checking out those repositories.
If you manage a manifest,
we have a new manifest creator
that just went GA that you can
use to create a manifest for winget,
and then get started in uploading your package there.
Now that we have everything installed,
let's begin customizing our setup
starting with Windows Terminal.
As I mentioned earlier,
Windows Terminal is installed by default in Windows 11.
Windows Terminal is the new command-line experience
on Windows, and we are actively
working to make it the default experience
for all command-line applications.
If you're on Windows 10, you can get started with
Windows Terminal by installing
it from the Microsoft Store,
from GitHub, or winget.
Another great option is
installing Windows Terminal Preview,
which has all the latest features
as soon as we release them.
I'm actually going to open
up Windows Terminal Preview and
customize it since that is my preferred terminal.
I have it installed here,
I can just search for Terminal Preview, and then get
started customizing all the settings
that I like in Windows Terminal.
Windows Terminal is the new command experience,
it has tabs, it has panes,
it has a bunch of settings that you can customize,
and it's really just the new way of
the command line here on Windows.
You might notice here at the top of the screen,
it says Windows Terminal can be set as
the default terminal application in your settings.
We are working to make Windows Terminal
the default command-line experience on Windows.
If you don't want to wait,
you can set Windows Terminal as your default now.
You can do that by opening Settings,
and then heading over to this
Default terminal application setting.
Here I have it set to Windows Console Host,
this is the original host in Windows.
I'm going to change that to the
say Windows Terminal Preview,
so now whenever I open any command-line application,
whether it's Ubuntu or
another batch shell or command prompt,
it'll open in Windows Terminal Preview.
I'm going to save this and then I'm
actually going to demonstrate it really quickly.
If I hit "Save" I'll go into my start menu,
and then I'll
search for cmd and launch cmd as I normally would.
Then when I open this it'll actually open in
a new Windows Terminal Preview window
instead of the original Console Host window.
This is how you can set Windows Terminal by
default, and this is available on Windows 11.
There are a ton of customizations you can
do to make a terminal feel like yours.
Here are some fun visual settings that I'd
like to change to my PowerShell profile.
You can modify the opacity of the text buffer,
you can modify the background image.
We're going to do that here,
I'm just going to browse for
this night sky image I have in my downloads folder.
I'll also want to make sure that it's fit to
the screen properly, and it has
the proper stretch mode so that is uniform to
fill to make sure it's filling out the entire window.
I'm going to change the opacity of
the background image down to about 50,
and I'll change the opacity of the window itself as
well to get a little transparency down to about 63,
and I'll turn acrylic on.
If I hit "Save" here, you should be able to see all of
my changes that I've just made in my PowerShell window.
I do want to also change the color scheme,
I forgot to do that on the first time.
I'm going to go in here, change campbell
to one-half dark,
that is my preferred color scheme that
comes in Windows Terminal, and then I'll
hit "Save" and we'll be
all set to go with a customized terminal.
Those are 10 more customization settings
you can do here.
I just want to demonstrate a few of how to get
terminal looking nice and fresh really quickly.
Terminal does come with a lot of
functionality and it's a really powerful terminal.
The first feature that I want to
talk about is Command Palette.
Just like VS Code,
Windows Terminal has a command palette,
you can access it by going to the Command Palette in
the dropdown or you can access it by typing Control,
Shift P, just like in Visual Studio Code.
The Command Palette has a bunch
of actions that you can take.
In terminal, we list
every possible command that
you can do here at the Command Palette.
If you want to edit these actions or add your own,
you can go to the actions page on the settings UI,
or you could edit these settings at JSON file and add
some settings there too
to add your own actions if you'd like.
Another great functionality that we have is Split Panes.
If I go into the Command Pallete
and I start looking for split,
I can split the Windows Terminal pane,
and I can specify a profile that I'd like to split.
I'll hit "Split" and then I'll take
my Ubuntu profile and then
I can set the direction that I'd like to split it to.
I'll just split by automatic split,
and then here on the right, I have Ubuntu,
and then on the left I still have PowerShell.
This is really handy if you want
to be super productive with
many different shells all in one window.
If you hold Alt and then select a profile,
you can also split that profile that way
as well instead of opening the Command Palette.
If you'd like to close the panes that you've opened,
you could tap Control, Shift,
W and that will close any open panes that you have,
just so you can keep your pane management under control.
That's split panes and the Command Palette,
the next feature I want to talk about that we announced
last year at Build is quick mode.
Quick mode allows you to access
your terminal from anywhere in Windows.
You simply type windows back take, and
a terminal window will drop down
from the top of your screen.
This comes in handy when you want
to run a few quick commands,
then dismiss the terminal right away.
Quick mode will automatically use the shell you've set
as your default profile when you open it.
One heavily requested feature
that is the last feature I'd like to show you
in terminal
today is how to open
your terminal, or your profile as administrator.
A lot of people have been asking how can I open
terminal automatically as admin?
Well, you can do it now in Windows Terminal Preview.
To do this, you're going to have to
edit your settings.json file.
I can get there by going into Settings and
clicking "Open JSON file" on the bottom left,
or you can go into
the dropdown and select Settings and hold
Shift while you're clicking on Settings and that
will also open the settings.json file.
If you hold Alt while clicking on Settings,
you can get the default start JSON file if you want to
see the default settings that we provide for you.
I'm going to scroll down to my PowerShell profile,
this is the profile that I like to set as admin.
It has all the customizations here,
so it's the largest object.
All I have to do is add one line
that will set elevate to true.
Here we also have a JSON schema just like in winget.
You'll see the dropdown suggestions
that VS Code gives me,
I'll hit "Elevate" and then I'll set that to true.
What this will do is that it'll tell the terminal, hey,
I always want to launch as admin
whenever I'm launched, and this
is also my default profile,
which makes it a little bit more
in-depth of how terminal will
behave in terms of always being default.
If I launch PowerShell from here,
I'll get a new administrative window,
and you see the shield on the left,
and it says Administrator PowerShell.
Then every profile that I open
here opens as administrator.
This is a admin window
and you can't have mixed elevation.
All tabs will be admin here,
all tabs in the first window will be not elevated.
Since it's my default profile,
terminal will always open as
default or always open as administrator as default.
This is the profile that will
always open when you launch terminal.
This is how you can get terminal to always
launch as default if you'd like.
Windows Terminal is open source
so if you'd like to contribute to the GitHub repo,
it's at Microsoft/terminal on GitHub.
I'm also going to take this elevate line
out because I don't want
terminal to be elevated
throughout the rest of the session.
You can also learn all about
terminal on our doc site at aka.ms/terminal-docs.
A lot of our great features
are from the community and are from open source,
so I highly recommend you check out our repo and file
any feature requests or
bug fixes or contribute to the code as well.
You may have noticed in
my profile list that I have an Ubuntu profile.
This is supported by Windows Subsystem for Linux,
which lets me use Linux utilities
and apps right here on Windows.
If you want to get started with Linux,
you can either do it by
running wsl--install in your terminal.
That can be either in PowerShell or in command prompt.
This will install terminal from the command line,
you can also specify the distro you'd
like to install by adding -d
afterward and then the distro name or you
can install WSL from the Microsoft store.
The team has also recently released
a preview of wsl inside Microsoft Store.
If you are on the Insider program,
you can get the store updates
automatically if you install from the command line.
What's great about having WSL
in the store is that you'll
get updates automatically without
having to update Windows itself.
It's a really quick way to get nice features and iterate
quickly on the new features that the WSL team ships out.
Once you have WSL installed,
you can get your distro either
from the command line or from
the Microsoft Store and then get started using WSL.
WSL behaves just like
real Linux because it is real Linux.
There's a Linux kernel built into
Windows that WSL utilizes.
Another way that WSL feels like
real Linux is through graphical application support.
You can run GUI apps using
WSL along with your trusted command-line apps.
Let's actually run Blender,
which is a graphical application
that will run directly here on Windows.
You can see here Blender has launched.
There's the Linux toolbar at the top,
it has all the Linux styling,
but it's running right here on my taskbar.
What's really cool about running Linux GUI apps on
Windows is that Windows knows it's a Linux app
and will actually add this little text icon in front of
the application icon to tell you that
it is a app running on Linux.
The integration between Windows
and Linux is actually really seamless
in app launching because when you
open the Start menu and look for Blender,
you'll be able to find Blender
listed as a regular application
like you would in Windows,
and it also has the tux icon there to
let you know that it's a Linux app
also running on Windows.
That's how some Linux integration on Windows can feel
seamless going the other way
when you're using Windows applications,
you can access your Linux files very quickly
and have that integration that way as well.
I'm going to open the File Explorer
and here on the bottom left,
you could see Linux is a top-level menu item.
This is where all of my distro files will live,
this is where Ubuntu is,
and I can easily access my Linux files
here in my Windows applications.
As a pro tip to improve performance,
make sure to keep all of your project files
on the Linux file system rather than
crossing over the boundary and having
your project communicate between
the Windows and Linux sides.
If you'd like to learn more about WSL so you
can check out the WSL doc site at aka.ms/wsl.
At this point we could start
developing because we have just about everything set up,
but there is one more toolset
that I want to call out that I installed at
the beginning that adds a lot of
functionality to Windows, and that's PowerToys.
I did install PowerToys using
winget from the Microsoft Store,
and I'm going to launch it here and show you some
of the great tools that come inside PowerToys.
You can get PowerToys by installing it through
the Microsoft Store or from winget itself
or from GitHub.
PowerToys is a mini toolkit of features and tools
that makes developing Windows so much more enjoyable.
Here are some of my favorite
tools that I want to show you.
The first one is the File Explorer add-ons,
which allow you to preview
various file types and file explorer.
This is the settings window
of PowerToys and you can see all the settings
available to you and all the tools available to
you and which hotkeys open them.
Here for the file explorer add-ons,
I can have a preview window in
file explorer and it can preview files like
SBGs or markdowns or
PDFs or C++ files or anything like that.
If I go into my downloads folder and file
Explorer and then I type Alt,
P this will open
the preview window on the right side of file explorer,
and then I can select the JPEG file
and see that preview here on the right.
If I want to look at another file,
let's say that settings.json
file that I opened in vscode,
I can right click and open in file explorer here and
then also preview this code and file explorer as well.
If you're looking through
some project files and you want to see what's in,
then this is a really great way without
having to leave File Explorer to
see everything that's in those coding files,
here's that Jason here on the right.
This is one of my favorites from PowerToys,
the next toy or
tool that I want to talk about is PowerToys Run.
PowerToys Run is one of the original toys that came
out in PowerToys and it's been one of
my favorites since it's been released,
and it's an excellent way to
quickly launch the apps that you need.
Here you can customize
the plug-ins that are available to you to
make your run launch experience that much better.
There's things like calculator
or searching files and folders
and windows or navigate inside the Windows Registry.
Anything like that, you can add into
PowerToys Run to customize
your search and launch experience.
If you want to launch PowerToys Run,
you just type Alt, space,
and then I'm just going to quickly launch
terminal from here and
then get started using terminal
if that's what I'd like to do.
It's a really great launcher as well as having
those extra plug-ins that you can
do in addition to just searching,
big fan of PowerToys Run.
The last tool that I want to show you
is mouse utilities,
which I feel is maybe underrated,
but it's one of my favorites.
Mouse Utilities is really great because if you have
a really wide monitor or if you have multi-monitors,
you can find your mouse
really quickly with these utilities.
The first is the spotlight feature,
if you type left control twice,
you'll get that spotlight showing on
your mouse then you can easily find your mouse.
Whether you're on a large screen or
a small screen, it's really handy.
This is also great for accessibility,
if you have a difficult time finding your mouse,
this is one way to find it quickly.
If you want to highlight the clicks
that you have or clicks that you do,
you can enable the mouse highlighter with Win, Shift,
H and then when you click you'll get a yellow highlight.
Then the last one at the bottom is
the mouse pointer crosshairs,
which is another way to help
find your mouse on the screen.
PowerToys is open source,
it's constantly getting more tools.
One announcement we have today is that
PowerToys now supports arm64 devices.
If you want to contribute, you can find
the GitHub repo at /Microsoft/powertoys.
If you want to learn more about PowerToys,
check out the doc site at aka.ms/powertoys-docs.
Let's recap what we've chatted about,
when setting up your Windows Machine for development,
you can use the Windows Package manager
to install all of your packages.
You can use the new powerful Windows terminal for
your command line apps and customize it to your liking.
Windows subsystem for Linux allows you to
run Linux apps side by side your Windows ones,
giving you the best of both worlds.
Lastly, PowerToys has a bunch of
awesome utilities that improve
the development experience on Windows.
I hope you've enjoyed today's session
and have learned a bunch about
our awesome developer tools. I'll see you next time.