This question already has answers here:
Command prompt won't change directory to another drive
(14 answers)
Closed last month.
I have tried
cd E:
cd "E:\android\webrtc_tutorial"
cd ..
However, i noticed that cd .. will successfully go up a directory. But I still cant change it to E drive. or the desired directory. (see pic2)
That's a common weird thing with cmd.
to change drive, just write the drive path and ':' to cd into it.
for example. to cd into E drive, write in the cmd:
E:
and then press enter.
Also you can use the cd '/d' option which allows you to change the current drive , so to go from C:\Users to E:\android\webrtc_tutorial
You would write: cd /d E:\android\webrtc_tutorial
Related
This question already has answers here:
Difference between ./ and ~/
(6 answers)
Closed 1 year ago.
I am quite new to using Bash, so apologies if this is a rather rudimentary question;
I am trying to open a text file in Bash, but Bash does not seem to be able to find any of my files or directories at all. Whenever I try to use the cat command or cd command (for example, cd Desktop/), no matter what file or directory I specify, Bash tells me "No such file or directory". pwd says that I am in /mnt/c/WINDOWS/system32 . ls shows me a very long list of files, but none of them are that for which I am looking. I am trying to open a .txt file on my Desktop, but neither the Desktop nor the txt file are showing up in that list. I'm running Bash via the Linux subsystem on Windows 10.
He are tips to start with WSL:
Your windows files will be found at /mnt/c/
cd /mnt/c
from here use ls to see the folders and find the files you want to use, I personally tend to put the files I use with windows subsystem for linux on the C: directory for easier use, like c:\FilesForWSL you can just create the folder on windows or cd /mnt/c and mkdir FilesForWsl then cd FilesForWsl.
After this setup anytime you want to put a file to be used by windows or from windows into linux just go to cd /mnt/c/FilesForWsl substitute FilesForWsl with your preferred folder name. Hope this clarify a little how WSL works.
I am using cmd to access C directory in windows 10. But it always go to C:\Users\LENOVO>. Actually I have to go to xampp folder in C drive. I have tried a few options but could not reach to xampp.
Some of them are:
C:\Users\LENOVO>C:
This results to C:\Users\LENOVO>.
Another one,
C:\Users\LENOVO>C: cd xampp
This also results the same: C:\Users\LENOVO>.
So please help me to access xampp folder which is in C drive as the cmd is always on
C:\Users\LENOVO>
However writing D: to cmd go to
D:\>.
This is not a valid command.
C: cd xampp
Use this instead.
CD C:\xampp
or
CD /D C:\xampp
The /D switch is explained in the help information using CD /?. It will also change the current drive letter. If you are currently on a D: directory, just using CD C:\Users\me will change the current directory on C:, but it will not change the current working drive away from D:.
Try cd / or maybe cd ../..
Both of these options will take you to base directory.
Open your command prompt. Write on it cd xampp then you reach on this folder.
I am having an issue with the windows cmd line. When I cd into my Users dir my user folder shows as there but I cannot cd into. The path cd\Users\gmenfan83\ is my desired location. However, when I am in the Users dir and cd\Users\gmenfan83 \ I get a "The path is not found or specified" . I am more of a nix user but if the folder shows in the directory tree shouldn't I be able to cd into it? Thank you
Are you trying to use cd/Users/gmenfan83 while you have already used cd/Users? In that case you will not be able to find the file since you are already in the Users folder. Typing cd \Users\gmenfan83 right after opening cmd with C drive path should get you there.
It's unclear (even after your edit) what specifically you're doing, but this should get you started.
If you're currently in C:\users, and you want to change into the C:\Users\gmenfan83 folder, all you need is cd gmenfan83. If you're in C:\, all you need is cd users\gmenfan83.
Relative paths also work in Windows cmd.exe just as they do under *nix. To change from C:\users\gmenfan83\test to C:\users\gmenfan83\temp, you can use cd ..\temp, or specify cd \users\gmenfan83\temp.
I am using Git Bash and am trying a few things like making a 'commit' and 'push' to GitHub.
I want to get out of the current directory C:\user\myUsername\app and land in the C:\user\myUsername folder.
What commands do I write in Git Bash?
To change your directory in git-bash to that specific path you can use this command :
cd /c/user/myUsername
basically you have to replace backslash with standard slash, or otherwise if you simply want to go to the parent directory you can use :
cd ..
as stated in comments that you already received on your question ...
Just wanted to add, make sure to insert space between cd and ..
no: cd..
yes: cd ..
If you want to move one directory up, just type command cd .. if you are following any tutorials most probably they will use macOS so that means they will use there own linux commands like
cd/home/your username.So just click type cd .. it will leads to go to previous directory.Most probably people will type like this cd ..users/username so don't do that mistake; just type cd .. .
Other mistakes:
don't type :- cd..
do :- cd ..
give space between cd and dots.
If you want to quickly move one directory up in git bash, type the command cd ../ and make sure there is a SPACE between cd and .. My version of Gitbash will NOT do anything if I type cd .. ONLY.
You can also use this command in git-bash to go back to the previous directory :
cd -
The above command does the same as cd ..
I am beginning to learn ruby and was following the instructions of one video to access the desktop through the -ls command in the terminal. Now, I would like to get out of the desktop in the terminal and don't know how. I know, I know I am a total noob... but can someone please help. Thanks. BTW the command I wrote was:
my-iMac~ me$ cd Desktop/
my-iMac:Desktop samuel$ ls
Where would you like to go?
Go home: cd or cd ~
Go to the previous working directory: cd $OLDPWD
Go to parent of the current directory: cd ..
Go to any directory you want: cd /path/to/directory
cd .. will take you back up 1 level.
for windows, you can open up the file explorer copy path then in your command prompt type "cd" then paste path. Your command prompt should now default to that path. (you can also type the entire path)
cd C:\Users\username\Documents\Folder