

Let’s start by learning how to move around between directories and view their contents. Entering sl ~ is just like opening the folder called “Users” and from there “YOURUSERNAME” using your GUI. (The desktop is actually just another folder within your user folder, that is, a subdirectory of the user directory). “Directory” is just another word for “folder,” and PowerShell considers your user folder - not the desktop - to be your home. This will bring you to your home directory: C:\Users\YOURUSERNAME where “YOURUSERNAME” is replaced with the name of your account on the machine. You should see something similar, but with your user name. NavigationĪ nice thing about PowerShell is you always know where you are because it tells you in the prompt.

You may have to close and re-open PowerShell to get it to display correctly. If you don’t like the white on blue, right click the top bar, select “properties,” and go to “colors” to change things. When you open it, it will look like this: It is a 32-bit version.) We want 64-bit and simple, so we’ll use the one just called “Windows PowerShell.” You may want to pin it to your task-bar (right click it to get this option). (If you’ve been around a while, you’ll remember old Intel processors from the 80s and early 90s called “286,” “386,” “486,” and so forth. “x86” exists for backwards compatibility. You probably have several different options, like “PowerShell,” “PowerShell ISE,” and “PowerShell (x86).” The ISE (integrated scripting environment) is a handy tool which allows you to write scripts on the fly, and also has a convenient look-up for all the PowerShell commands. Run a search for PowerShell on your computer. You will first learn to navigate through your files and do some of the basic tasks you do every day on the computer. The command line is also the best place to work with programs you have custom built for your own research using programming languages like Python. Most importantly, a number of tools of value to humanists can only be run from the command line, including many you can learn about on The Programming Historian, like Mallet, Pandoc, or Wget. It makes it possible to automate tasks and to do many things with one command. (Technically, PowerShell is more than just the CLI, and you can get a quick overview of its features on Wikipedia.) Using the command line has many advantages. A command-line interface (CLI) is a program for telling your computer to do tasks using typed commands, rather than by clicking pictures on the desktop as in a graphical user interface (GUI). Windows PowerShell is a command-line interface for Windows computers. If you are using an earlier version, you may encounter a few small syntax differences which you should be able to overcome with a little help from a search engine. This tutorial was written for PowerShell 5.0. You will also get set up to run Python scripts from the command line. In the second section, “ Doing More,” you will get a glimpse of some of the features that make work on the command line particularly efficient, and learn enough of the basics to be able to explore further on your own. In the first section, “ Getting Started,” you will learn to do basic desktop tasks like creating and opening files and folders using PowerShell. The tutorial is divided into two main sections. If you are already familiar with using Bash, you may be able to get started with PowerShell just by looking at the table at the end of this lesson.
How to make a new file in windows 10 mac#
If you are a Mac or Linux user, you should check out the Bash introduction instead. This tutorial will introduce you to the basics of Windows PowerShell, the standard command-line interface for Windows computers.

Solving the Infinite Loop Problem with the -exclude Parameter.Infinite Loops and Aborting with control-c.Working with Lots of Files at Once Using Wildcards ( *).Reading Files with Get-Content ( gc, cat).Writing to Files with Write-Output ( write, echo) and Redirection.Copying and Moving Files with Copy-Item ( cp) and Move-Item ( mv).Moving fast with Push-Location ( pushd) and Pop-Location ( popd).Understanding the Tree Structure of Your Computer’s File System.Using Explorer to View Directories in the GUI.Moving Between Directories with Set-Location ( sl, cd).Viewing Directory Contents with Get-ChildItem ( gci, ls).What is PowerShell and Why is it Useful?.
