4

I’m new to Linux/Ubuntu. To my knowledge it’s not possible to make file or folder with only difference in case e.g. I can’t create the files Text.ini and text.ini (well you can but it will not work, it gives you an error), so why does the terminal care about case when you write path to something e.g. cd folder/folder but if the second folder starts with capital F then command doesn’t work?

In Windows it doesn’t matter with capital letters or not it works, so is there any way for the terminal to ignore case if the names are correct?

dessert
  • 40,956
Foris
  • 53

1 Answers1

7

It's possible to make the terminal autocomplete behave in a case-insensitive manner which gets close to what you are most likely looking for. Add the line

set completion-ignore-case on

to /etc/inputrc and start a new terminal. After that,

cd foldTab/foldTab
will get you to the correct directory even if the second folder is in reality Folder. You'll see the autocompletion change the directory name on the fly accordingly.
dessert
  • 40,956