Git Bash: My Desktop folder not found help me - bash

$ cd /Desktop
bash: cd: /Desktop: No such file or directory
and start. command finally I have got the Desktop folder

You can try :
$ cd ~/Desktop
where ~ represents your home directory.

If you are using git bash it does not matter which os you use, your home directory located at ~ and Desktop is under ~/Desktop
Windows
Under windows, it will be mapped to /c/Users/<your user>/Desktop
Linux based Os
Under unix/linux it will be your /home//Desktop

Related

problems with git bash on windows. i can't access folders on git bash for windows

i bought a course from codecademy and at beginner was a lesson about git bash. I install it , but if i want to change directories with "cd" i cant't.
enter image description here
Also , when i double-click on shortcut the program doesn't run.
Try changing to you home directory first
$ cd
then
$ pwd
/c/Users/yourname
Try going to you root directory with : cd / (make sure you add a space between cd and /)
Then do cd yourfilename/yourfilename....you can add multiple directories
Make sure your spelling is correct
Few other tips :
To navigate to your home directory use "cd ~".
To navigate to the previous directory use "cd -"

-bash: cd: /tensorflow1: No such file or directory in ubuntu, but the file is there

I am using ubuntu 16.04 and created a virtual environment called 'tensorflow1' as shown above. I am using putty to access a machine remotely. So I was trying to change directory by typing "cd /tensorflow1/models/research" but it says "-bash: cd: /tensorflow1: No such file or directory" in ubuntu, but the file is there. I typed "ls" and it also shows the file. Why is it so?
When you type ls you see the content of the current directory. When you type cd /tensorflow1 you're trying to enter a directory tensorflow1 at the root (/) of the filesystem and the directory is certainly not there. You just need
cd tensorflow1/models/research
to enter a subdirectory of the current directory. Or
cd ./tensorflow1/models/research
because . means "the current directory".
You probably want cd ./tensorflow1/models/research or just cd tensorflow1/models/research.
Read about root directory, home directory, working directory then about path_resolution(7)

How to access my Documents via Terminal on Mac?

So every time I type cd /Documents it says
Users-MBP-4:~ user$ cd /Documents
-bash: cd: /Documents: No such file or directory
Users-MBP-4:~ user$
For some reason it only works when I type cd /Applications
I'm not too experienced with Using terminal on the Mac, any advice will help!
Your documents are stored within your home directory, not at the root of the volume.
Try this instead:
cd ~/Documents
The path should be:
cd /Users/YourUserName/Documents
Just substitute for YourUserName

How to set Git Bash directory to home?

when I start up git bash I get the following location as my startup location:
[Me]#[Me] MINGW64 /
$ dir
bin cmd dev etc git-bash.exe git-cmd.exe LICENSE.txt mingw64 proc
ReleaseNotes.html tmp unins000.dat unins000.exe usr
How can I change it so that I am in my documents folder on my computer?
As in all versions of bash, this is the default behavior of cd if given no arguments, or the explicitly-specified behavior of cd ~ or cd "$HOME":
$ pwd
/
$ cd
$ pwd
/c/Users/Charles Duffy
Similarly, cd ~/Documents will move to the Documents subdirectory of same.
If you set the Windows environment variable %HOME% to your Document folder, a simple cd will get you there.
set HOME=%USERPROFILE%\Documents
git bash
cd
With git version 2.8.3.windows.1, typing git bash in any folder opens a git bash in that folder.
Then type cd and you are at $HOME.
There are side effects of setting HOME. For example emacs gets a new home, which is not in the roaming profile.
So, as an alternative, edit .bash_profile, add this at the end: cd ~ .

How do I reverse the cd command in the Terminal on Mac OS X?

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

Resources