Command line basics

self-taught

#1

hi

I am struggling to complete the first command assignment. I am working with the command prompt available on windows 10.

Assignment instruction as follows: Before diving into the command line lesson, you’ll want to know how to create a file. You can do so with the touch command. Open your terminal and enter ls. ls will show you the files and folders in the current directory(or will show nothing if the current directory is empty). Create a file called test.txt by entering this in your terminal: touch test.txt. Now enter ls once again.
I have attached an image to show what’s happening. please help!

thanks.!

Capture|612x395


#2

edit: your link didn’t work for me. So I went long winded.

In terminal can you do an $ls and see anything?
You should be at a user level in the directory.
Make a folder: $ mkdir “whatever you call it”
This is a directory…
No to change directory: $ cd “whatever you call it”
In here you can make your file.
You can $ ls
See it’s empty.
Then: $ touch test.txt
Then $ls again.
Should see your file in the directory you just created.


#3

thanks :blush:

I have another question for these steps to work do I need to install Linux?


#4

Capture


#5

From the Start Menu
Click Start, type PowerShell, and then click Windows PowerShell.

Then try again.


#6

Finally its working on powershell. i spent half of the day trying to make it work. i didn’t want to install another operating system, Linux as i am just a beginner. although it is in the assignment that i should install Linux. I am not really sure what to do here.

link to assignment : https://www.theodinproject.com/courses/web-development-101/lessons/command-line-basics-web-development-101


#7

What is the question? You don’t know what to do with the entire assignment? Just type what they type into terminal.


#8

is it necessary to install Linux to complete command line assignments in the future?


#9

You can do it on windows. It’s just easier with Linux and Mac. You can run a virtual machine to get Linux. Or just use the old PC until you buy something else.


#10

I would highly recommend you to run a VM with any debian-like linux distro, you will more likely find less problems when it comes to the Git part and AFAIK TOP doesn’t have a tutorial for only Windows.