Windows cmd/powershell Basic Commands Flashcards
Nuts and bolts of powershell
pwd
Print Working Directory
hostname
My computer’s network name
mkdir
Make directory
cd
Change directory
ls
list directory
rmdir
Remove directory
pushd
push directory
popd
Pop directory
cp
Copy a file or directory
robocopy
Robust copy
mv
Move a file or directory
more
Page through a file
type
Print the whole file
forfiles
Run a command on lots of files
dir -r
Find files
select-string
find things inside files
help
Read a manual page
helpctr
Find what man page is appropriate
echo
Print some arguments
set
Export/set a new environment variable
exit
Exit the shell
runas
DANGER! Become super user root DANGER!
What command does the following?
Print Working Directory
pwd
What command does the following?
My computer’s network name
hostname