Error when using the commands cd.. and cd. in the terminal [duplicate]
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
This question already has an answer here:
How do I navigate between directories in terminal?
4 answers
I try to use the commands cd..
and cd.
in the terminal to move from my current folder to a previous one, and it shows me a message that the command doesn't exist...
What could the problem be? I'm using Ubuntu 18.04 LTS.
command-line bash cd-command
marked as duplicate by Helio, karel, Thomas, Fabby, David Foerster Aug 29 '18 at 20:34
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How do I navigate between directories in terminal?
4 answers
I try to use the commands cd..
and cd.
in the terminal to move from my current folder to a previous one, and it shows me a message that the command doesn't exist...
What could the problem be? I'm using Ubuntu 18.04 LTS.
command-line bash cd-command
marked as duplicate by Helio, karel, Thomas, Fabby, David Foerster Aug 29 '18 at 20:34
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
3
You need to add a space between the commmand (cd
) and the arguments (the path where you want to go). By the way: welcome to AskUbuntu.
– Helio
Aug 29 '18 at 13:29
2
To addcd..
is a Windows thing..
– George Udosen
Aug 29 '18 at 13:31
4
@GeorgeUdosen DOS thing, too. I made the same mistake OP did when I first opened a bash shell.
– dsstorefile1
Aug 29 '18 at 13:38
add a comment |
This question already has an answer here:
How do I navigate between directories in terminal?
4 answers
I try to use the commands cd..
and cd.
in the terminal to move from my current folder to a previous one, and it shows me a message that the command doesn't exist...
What could the problem be? I'm using Ubuntu 18.04 LTS.
command-line bash cd-command
This question already has an answer here:
How do I navigate between directories in terminal?
4 answers
I try to use the commands cd..
and cd.
in the terminal to move from my current folder to a previous one, and it shows me a message that the command doesn't exist...
What could the problem be? I'm using Ubuntu 18.04 LTS.
This question already has an answer here:
How do I navigate between directories in terminal?
4 answers
command-line bash cd-command
command-line bash cd-command
edited Aug 29 '18 at 14:21
Zanna
51.5k13141244
51.5k13141244
asked Aug 29 '18 at 13:17
dsmastrodomenicdsmastrodomenic
392
392
marked as duplicate by Helio, karel, Thomas, Fabby, David Foerster Aug 29 '18 at 20:34
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Helio, karel, Thomas, Fabby, David Foerster Aug 29 '18 at 20:34
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
3
You need to add a space between the commmand (cd
) and the arguments (the path where you want to go). By the way: welcome to AskUbuntu.
– Helio
Aug 29 '18 at 13:29
2
To addcd..
is a Windows thing..
– George Udosen
Aug 29 '18 at 13:31
4
@GeorgeUdosen DOS thing, too. I made the same mistake OP did when I first opened a bash shell.
– dsstorefile1
Aug 29 '18 at 13:38
add a comment |
3
You need to add a space between the commmand (cd
) and the arguments (the path where you want to go). By the way: welcome to AskUbuntu.
– Helio
Aug 29 '18 at 13:29
2
To addcd..
is a Windows thing..
– George Udosen
Aug 29 '18 at 13:31
4
@GeorgeUdosen DOS thing, too. I made the same mistake OP did when I first opened a bash shell.
– dsstorefile1
Aug 29 '18 at 13:38
3
3
You need to add a space between the commmand (
cd
) and the arguments (the path where you want to go). By the way: welcome to AskUbuntu.– Helio
Aug 29 '18 at 13:29
You need to add a space between the commmand (
cd
) and the arguments (the path where you want to go). By the way: welcome to AskUbuntu.– Helio
Aug 29 '18 at 13:29
2
2
To add
cd..
is a Windows thing..– George Udosen
Aug 29 '18 at 13:31
To add
cd..
is a Windows thing..– George Udosen
Aug 29 '18 at 13:31
4
4
@GeorgeUdosen DOS thing, too. I made the same mistake OP did when I first opened a bash shell.
– dsstorefile1
Aug 29 '18 at 13:38
@GeorgeUdosen DOS thing, too. I made the same mistake OP did when I first opened a bash shell.
– dsstorefile1
Aug 29 '18 at 13:38
add a comment |
3 Answers
3
active
oldest
votes
You need to add a space between the commmand (cd
) and the arguments (the path where you want to go).
In your case, you should use cd ..
instead of cd..
Also, please note that the previous folder directory is not the same as the parent directory. I encourage you to check this answer to obtain more information about the directory navigation basics in Linux.
5
One thing mentioned neither in the linked answer nor here is that the way to get to the “previous folder” iscd -
.
– Emil Jeřábek
Aug 29 '18 at 14:34
1
The answer would be improved if it used the correct term: directory.
– jamesqf
Aug 29 '18 at 16:42
@jamesqf: you're right, I didn't think about the OP words.
– Helio
Aug 29 '18 at 16:58
5
Much as Linuxers like to insist on "directory", there's nothing wrong with using the term "folder" for a directory, not only because in most contexts they are interchangeable terms (note that Linux file management programs like nautilus use the latter (context menu offers Create Folder)) but also because while in technical usage a folder might not always be a directory, a directory will always be a folder.
– Zanna
Aug 29 '18 at 18:44
2
@Zanna, I'm not usually prone to argue about these common and seemingly improductive semantical and/or historical holy wars. However, I think that "folder" is a widespread term that is easier to grasp for the reader, even if "directory" can be used here with the same (or more precise) meaning. This reminds me an old answer, in which I learned that on the Kernel Ext4 documentation, that type of inode is called directory.
– Helio
Aug 29 '18 at 19:31
add a comment |
Try this to save your sanity:
alias cd..='cd ..'
Now you can type it either with the space or without and it will still work.
Explanation:
Windows and MS-DOS allow you to type CD.. to change directory to one level higher than you currently are. Some commands are built in to the command interpreter on those systems. Linux (and probably other *nixes) looks for a program followed by arguments, and the only way to separate the program and arguments is with a space. Hence, Linux is only seeing one command called 'cd..' and it can't find the executable for it. What you mean is 'cd ..' (cd => program, .. => argument).
My solution adds an alias for 'cd..' so that when you type that on a command line the system will instead run 'cd ..' (with space). See the other comments to this answer to see about adding that as a permanent alias.
3
nice :) You could add how to make this permanent by adding to.bashrc
– Zanna
Aug 29 '18 at 14:15
2
+1 Aliases are the best. I also usekk
andöö
as alias forll
;-) andyoda
as alias forsudo
:-D
– RoVo
Aug 29 '18 at 14:19
2
While this is an interesting workaround, I don't think it's a good idea to skip the explanation of why a basic command doesn't work by providing a more complex command, still without explanation.
– Clément
Aug 29 '18 at 17:11
1
@Clément, true. I've added an explanation.
– Luke G.
Aug 29 '18 at 18:32
2
cd
is also a builtin command on unix shells — but builtin commands obey the same syntax as external commands they don't get their own rules :)
– hobbs
Aug 29 '18 at 19:41
|
show 1 more comment
The actual command is cd ..
. You forgot that space.
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
You need to add a space between the commmand (cd
) and the arguments (the path where you want to go).
In your case, you should use cd ..
instead of cd..
Also, please note that the previous folder directory is not the same as the parent directory. I encourage you to check this answer to obtain more information about the directory navigation basics in Linux.
5
One thing mentioned neither in the linked answer nor here is that the way to get to the “previous folder” iscd -
.
– Emil Jeřábek
Aug 29 '18 at 14:34
1
The answer would be improved if it used the correct term: directory.
– jamesqf
Aug 29 '18 at 16:42
@jamesqf: you're right, I didn't think about the OP words.
– Helio
Aug 29 '18 at 16:58
5
Much as Linuxers like to insist on "directory", there's nothing wrong with using the term "folder" for a directory, not only because in most contexts they are interchangeable terms (note that Linux file management programs like nautilus use the latter (context menu offers Create Folder)) but also because while in technical usage a folder might not always be a directory, a directory will always be a folder.
– Zanna
Aug 29 '18 at 18:44
2
@Zanna, I'm not usually prone to argue about these common and seemingly improductive semantical and/or historical holy wars. However, I think that "folder" is a widespread term that is easier to grasp for the reader, even if "directory" can be used here with the same (or more precise) meaning. This reminds me an old answer, in which I learned that on the Kernel Ext4 documentation, that type of inode is called directory.
– Helio
Aug 29 '18 at 19:31
add a comment |
You need to add a space between the commmand (cd
) and the arguments (the path where you want to go).
In your case, you should use cd ..
instead of cd..
Also, please note that the previous folder directory is not the same as the parent directory. I encourage you to check this answer to obtain more information about the directory navigation basics in Linux.
5
One thing mentioned neither in the linked answer nor here is that the way to get to the “previous folder” iscd -
.
– Emil Jeřábek
Aug 29 '18 at 14:34
1
The answer would be improved if it used the correct term: directory.
– jamesqf
Aug 29 '18 at 16:42
@jamesqf: you're right, I didn't think about the OP words.
– Helio
Aug 29 '18 at 16:58
5
Much as Linuxers like to insist on "directory", there's nothing wrong with using the term "folder" for a directory, not only because in most contexts they are interchangeable terms (note that Linux file management programs like nautilus use the latter (context menu offers Create Folder)) but also because while in technical usage a folder might not always be a directory, a directory will always be a folder.
– Zanna
Aug 29 '18 at 18:44
2
@Zanna, I'm not usually prone to argue about these common and seemingly improductive semantical and/or historical holy wars. However, I think that "folder" is a widespread term that is easier to grasp for the reader, even if "directory" can be used here with the same (or more precise) meaning. This reminds me an old answer, in which I learned that on the Kernel Ext4 documentation, that type of inode is called directory.
– Helio
Aug 29 '18 at 19:31
add a comment |
You need to add a space between the commmand (cd
) and the arguments (the path where you want to go).
In your case, you should use cd ..
instead of cd..
Also, please note that the previous folder directory is not the same as the parent directory. I encourage you to check this answer to obtain more information about the directory navigation basics in Linux.
You need to add a space between the commmand (cd
) and the arguments (the path where you want to go).
In your case, you should use cd ..
instead of cd..
Also, please note that the previous folder directory is not the same as the parent directory. I encourage you to check this answer to obtain more information about the directory navigation basics in Linux.
edited Aug 29 '18 at 16:52
answered Aug 29 '18 at 13:19
HelioHelio
5,49432950
5,49432950
5
One thing mentioned neither in the linked answer nor here is that the way to get to the “previous folder” iscd -
.
– Emil Jeřábek
Aug 29 '18 at 14:34
1
The answer would be improved if it used the correct term: directory.
– jamesqf
Aug 29 '18 at 16:42
@jamesqf: you're right, I didn't think about the OP words.
– Helio
Aug 29 '18 at 16:58
5
Much as Linuxers like to insist on "directory", there's nothing wrong with using the term "folder" for a directory, not only because in most contexts they are interchangeable terms (note that Linux file management programs like nautilus use the latter (context menu offers Create Folder)) but also because while in technical usage a folder might not always be a directory, a directory will always be a folder.
– Zanna
Aug 29 '18 at 18:44
2
@Zanna, I'm not usually prone to argue about these common and seemingly improductive semantical and/or historical holy wars. However, I think that "folder" is a widespread term that is easier to grasp for the reader, even if "directory" can be used here with the same (or more precise) meaning. This reminds me an old answer, in which I learned that on the Kernel Ext4 documentation, that type of inode is called directory.
– Helio
Aug 29 '18 at 19:31
add a comment |
5
One thing mentioned neither in the linked answer nor here is that the way to get to the “previous folder” iscd -
.
– Emil Jeřábek
Aug 29 '18 at 14:34
1
The answer would be improved if it used the correct term: directory.
– jamesqf
Aug 29 '18 at 16:42
@jamesqf: you're right, I didn't think about the OP words.
– Helio
Aug 29 '18 at 16:58
5
Much as Linuxers like to insist on "directory", there's nothing wrong with using the term "folder" for a directory, not only because in most contexts they are interchangeable terms (note that Linux file management programs like nautilus use the latter (context menu offers Create Folder)) but also because while in technical usage a folder might not always be a directory, a directory will always be a folder.
– Zanna
Aug 29 '18 at 18:44
2
@Zanna, I'm not usually prone to argue about these common and seemingly improductive semantical and/or historical holy wars. However, I think that "folder" is a widespread term that is easier to grasp for the reader, even if "directory" can be used here with the same (or more precise) meaning. This reminds me an old answer, in which I learned that on the Kernel Ext4 documentation, that type of inode is called directory.
– Helio
Aug 29 '18 at 19:31
5
5
One thing mentioned neither in the linked answer nor here is that the way to get to the “previous folder” is
cd -
.– Emil Jeřábek
Aug 29 '18 at 14:34
One thing mentioned neither in the linked answer nor here is that the way to get to the “previous folder” is
cd -
.– Emil Jeřábek
Aug 29 '18 at 14:34
1
1
The answer would be improved if it used the correct term: directory.
– jamesqf
Aug 29 '18 at 16:42
The answer would be improved if it used the correct term: directory.
– jamesqf
Aug 29 '18 at 16:42
@jamesqf: you're right, I didn't think about the OP words.
– Helio
Aug 29 '18 at 16:58
@jamesqf: you're right, I didn't think about the OP words.
– Helio
Aug 29 '18 at 16:58
5
5
Much as Linuxers like to insist on "directory", there's nothing wrong with using the term "folder" for a directory, not only because in most contexts they are interchangeable terms (note that Linux file management programs like nautilus use the latter (context menu offers Create Folder)) but also because while in technical usage a folder might not always be a directory, a directory will always be a folder.
– Zanna
Aug 29 '18 at 18:44
Much as Linuxers like to insist on "directory", there's nothing wrong with using the term "folder" for a directory, not only because in most contexts they are interchangeable terms (note that Linux file management programs like nautilus use the latter (context menu offers Create Folder)) but also because while in technical usage a folder might not always be a directory, a directory will always be a folder.
– Zanna
Aug 29 '18 at 18:44
2
2
@Zanna, I'm not usually prone to argue about these common and seemingly improductive semantical and/or historical holy wars. However, I think that "folder" is a widespread term that is easier to grasp for the reader, even if "directory" can be used here with the same (or more precise) meaning. This reminds me an old answer, in which I learned that on the Kernel Ext4 documentation, that type of inode is called directory.
– Helio
Aug 29 '18 at 19:31
@Zanna, I'm not usually prone to argue about these common and seemingly improductive semantical and/or historical holy wars. However, I think that "folder" is a widespread term that is easier to grasp for the reader, even if "directory" can be used here with the same (or more precise) meaning. This reminds me an old answer, in which I learned that on the Kernel Ext4 documentation, that type of inode is called directory.
– Helio
Aug 29 '18 at 19:31
add a comment |
Try this to save your sanity:
alias cd..='cd ..'
Now you can type it either with the space or without and it will still work.
Explanation:
Windows and MS-DOS allow you to type CD.. to change directory to one level higher than you currently are. Some commands are built in to the command interpreter on those systems. Linux (and probably other *nixes) looks for a program followed by arguments, and the only way to separate the program and arguments is with a space. Hence, Linux is only seeing one command called 'cd..' and it can't find the executable for it. What you mean is 'cd ..' (cd => program, .. => argument).
My solution adds an alias for 'cd..' so that when you type that on a command line the system will instead run 'cd ..' (with space). See the other comments to this answer to see about adding that as a permanent alias.
3
nice :) You could add how to make this permanent by adding to.bashrc
– Zanna
Aug 29 '18 at 14:15
2
+1 Aliases are the best. I also usekk
andöö
as alias forll
;-) andyoda
as alias forsudo
:-D
– RoVo
Aug 29 '18 at 14:19
2
While this is an interesting workaround, I don't think it's a good idea to skip the explanation of why a basic command doesn't work by providing a more complex command, still without explanation.
– Clément
Aug 29 '18 at 17:11
1
@Clément, true. I've added an explanation.
– Luke G.
Aug 29 '18 at 18:32
2
cd
is also a builtin command on unix shells — but builtin commands obey the same syntax as external commands they don't get their own rules :)
– hobbs
Aug 29 '18 at 19:41
|
show 1 more comment
Try this to save your sanity:
alias cd..='cd ..'
Now you can type it either with the space or without and it will still work.
Explanation:
Windows and MS-DOS allow you to type CD.. to change directory to one level higher than you currently are. Some commands are built in to the command interpreter on those systems. Linux (and probably other *nixes) looks for a program followed by arguments, and the only way to separate the program and arguments is with a space. Hence, Linux is only seeing one command called 'cd..' and it can't find the executable for it. What you mean is 'cd ..' (cd => program, .. => argument).
My solution adds an alias for 'cd..' so that when you type that on a command line the system will instead run 'cd ..' (with space). See the other comments to this answer to see about adding that as a permanent alias.
3
nice :) You could add how to make this permanent by adding to.bashrc
– Zanna
Aug 29 '18 at 14:15
2
+1 Aliases are the best. I also usekk
andöö
as alias forll
;-) andyoda
as alias forsudo
:-D
– RoVo
Aug 29 '18 at 14:19
2
While this is an interesting workaround, I don't think it's a good idea to skip the explanation of why a basic command doesn't work by providing a more complex command, still without explanation.
– Clément
Aug 29 '18 at 17:11
1
@Clément, true. I've added an explanation.
– Luke G.
Aug 29 '18 at 18:32
2
cd
is also a builtin command on unix shells — but builtin commands obey the same syntax as external commands they don't get their own rules :)
– hobbs
Aug 29 '18 at 19:41
|
show 1 more comment
Try this to save your sanity:
alias cd..='cd ..'
Now you can type it either with the space or without and it will still work.
Explanation:
Windows and MS-DOS allow you to type CD.. to change directory to one level higher than you currently are. Some commands are built in to the command interpreter on those systems. Linux (and probably other *nixes) looks for a program followed by arguments, and the only way to separate the program and arguments is with a space. Hence, Linux is only seeing one command called 'cd..' and it can't find the executable for it. What you mean is 'cd ..' (cd => program, .. => argument).
My solution adds an alias for 'cd..' so that when you type that on a command line the system will instead run 'cd ..' (with space). See the other comments to this answer to see about adding that as a permanent alias.
Try this to save your sanity:
alias cd..='cd ..'
Now you can type it either with the space or without and it will still work.
Explanation:
Windows and MS-DOS allow you to type CD.. to change directory to one level higher than you currently are. Some commands are built in to the command interpreter on those systems. Linux (and probably other *nixes) looks for a program followed by arguments, and the only way to separate the program and arguments is with a space. Hence, Linux is only seeing one command called 'cd..' and it can't find the executable for it. What you mean is 'cd ..' (cd => program, .. => argument).
My solution adds an alias for 'cd..' so that when you type that on a command line the system will instead run 'cd ..' (with space). See the other comments to this answer to see about adding that as a permanent alias.
edited Aug 29 '18 at 18:32
answered Aug 29 '18 at 13:55
Luke G.Luke G.
1693
1693
3
nice :) You could add how to make this permanent by adding to.bashrc
– Zanna
Aug 29 '18 at 14:15
2
+1 Aliases are the best. I also usekk
andöö
as alias forll
;-) andyoda
as alias forsudo
:-D
– RoVo
Aug 29 '18 at 14:19
2
While this is an interesting workaround, I don't think it's a good idea to skip the explanation of why a basic command doesn't work by providing a more complex command, still without explanation.
– Clément
Aug 29 '18 at 17:11
1
@Clément, true. I've added an explanation.
– Luke G.
Aug 29 '18 at 18:32
2
cd
is also a builtin command on unix shells — but builtin commands obey the same syntax as external commands they don't get their own rules :)
– hobbs
Aug 29 '18 at 19:41
|
show 1 more comment
3
nice :) You could add how to make this permanent by adding to.bashrc
– Zanna
Aug 29 '18 at 14:15
2
+1 Aliases are the best. I also usekk
andöö
as alias forll
;-) andyoda
as alias forsudo
:-D
– RoVo
Aug 29 '18 at 14:19
2
While this is an interesting workaround, I don't think it's a good idea to skip the explanation of why a basic command doesn't work by providing a more complex command, still without explanation.
– Clément
Aug 29 '18 at 17:11
1
@Clément, true. I've added an explanation.
– Luke G.
Aug 29 '18 at 18:32
2
cd
is also a builtin command on unix shells — but builtin commands obey the same syntax as external commands they don't get their own rules :)
– hobbs
Aug 29 '18 at 19:41
3
3
nice :) You could add how to make this permanent by adding to
.bashrc
– Zanna
Aug 29 '18 at 14:15
nice :) You could add how to make this permanent by adding to
.bashrc
– Zanna
Aug 29 '18 at 14:15
2
2
+1 Aliases are the best. I also use
kk
and öö
as alias for ll
;-) and yoda
as alias for sudo
:-D– RoVo
Aug 29 '18 at 14:19
+1 Aliases are the best. I also use
kk
and öö
as alias for ll
;-) and yoda
as alias for sudo
:-D– RoVo
Aug 29 '18 at 14:19
2
2
While this is an interesting workaround, I don't think it's a good idea to skip the explanation of why a basic command doesn't work by providing a more complex command, still without explanation.
– Clément
Aug 29 '18 at 17:11
While this is an interesting workaround, I don't think it's a good idea to skip the explanation of why a basic command doesn't work by providing a more complex command, still without explanation.
– Clément
Aug 29 '18 at 17:11
1
1
@Clément, true. I've added an explanation.
– Luke G.
Aug 29 '18 at 18:32
@Clément, true. I've added an explanation.
– Luke G.
Aug 29 '18 at 18:32
2
2
cd
is also a builtin command on unix shells — but builtin commands obey the same syntax as external commands they don't get their own rules :)– hobbs
Aug 29 '18 at 19:41
cd
is also a builtin command on unix shells — but builtin commands obey the same syntax as external commands they don't get their own rules :)– hobbs
Aug 29 '18 at 19:41
|
show 1 more comment
The actual command is cd ..
. You forgot that space.
add a comment |
The actual command is cd ..
. You forgot that space.
add a comment |
The actual command is cd ..
. You forgot that space.
The actual command is cd ..
. You forgot that space.
answered Aug 29 '18 at 13:20
KulfyKulfy
5,32561945
5,32561945
add a comment |
add a comment |
3
You need to add a space between the commmand (
cd
) and the arguments (the path where you want to go). By the way: welcome to AskUbuntu.– Helio
Aug 29 '18 at 13:29
2
To add
cd..
is a Windows thing..– George Udosen
Aug 29 '18 at 13:31
4
@GeorgeUdosen DOS thing, too. I made the same mistake OP did when I first opened a bash shell.
– dsstorefile1
Aug 29 '18 at 13:38