How in Ubuntu in the console mode (only English) go to the folder with the Russian name?
4 answers
options without reconfiguring input tools:
- Run (having previously installed, if not installed, and there is such an opportunity) some file manager:
mc
,lfm
,vifm
,ranger
, etc. if
vim
installed (notvi
!) and you need to edit a file, you can use it as a file manager:vim .
- the program will run in netrw mode (by default, this script seems to be installed in ubuntu ), where you can “go” to any file / directory.pressing enter will be interpreted for the directory as
cd
, for a file opening it for editing.if
emacs
installed, you can use its dired - directory editor package.for the most extreme (but absolutely universal) case, you can use the
cd "$(...)"
construct, where instead...
should be a command that returns the name of the desired directory (quotes are needed for cases when there are spaces in the directory name).this may be, for example, the command
ls | sed -n 2p
ls | sed -n 2p
, where2
is the number of the desired directory in the output ofls
.you can see the numbered issue of
ls
, for example, like this:$ ls | nl 1 bin 2 boot 3 dev 4 etc ...
Ie, to go to the
boot
directory, you must run:$ cd "$(ls | sed -n 2p)"
- By the way, I read today that you are spending all the votes on the analysis of invaluable answers. Thank you, this is a very valuable thing. I now do not have time to look there already. And thanks for updating the statistics too! - Nick Volynkin ♦ 2:41 pm
- the answer approach tries to circumvent the problem, instead of solving it - to set up a normal environment so that Unicode is normally perceived, for example, you can look at the Russian (Chinese, Japanese, whatever you want) letters in the C.UTF-8 locale. It is not clear from the question what the problem is (maybe someone has logged in on ssh to the system and their locale is not configured and therefore the POSIX locale is used by default and, accordingly, only ASCII allows you to enter). - jfs
- @jfs, I’m happy to read and vote for your answer. - aleksandr barakin
- there are not enough details to answer the question (it is too general and it is too late to change it already). The purpose of my comment is to make people not too enthusiastic about the solutions presented in your answer, but to solve the root problem (Ubuntu is remarkably Unicode supported). For example, although my is not displayed as a flag (the font probably is not worth a suitable one), but Chromium understands that this is one character, not two or 8. - jfs
- Change something is not always possible. For example, you solve a problem through TeamViewer. The client has a German layout, which in turn is connected to KVM, where the settings are Norwegian. Here you will remember more than one hack. - Hellseher
Configure support for the Russian language in the console:
sudo dpkg-reconfigure console-setup
Well, then just:
cd /папка/с/русским/названием/
Well, or stupidly sort through the options using autocompletion (tab th). However, this is inconvenient, and even without a font supporting Cyrillic (configured in the console-setup), you still will not see Russian names normally.
- And just
export LANG=ru_RU.UTF-8
does not help? - installero - one@installero, the locale is irrelevant to this case. - aleksandr barakin
- @Sergey Rufanov is not correct, how will you screen it (do you mean spaces)? Where is the terminal encoding known from? how will we know? as some have previously commented (they will understand): learn materiel - user197988
If the console supports selection and insertion, you can display a list of directories, select the desired one and insert after the cd
- and if there is no mouse? - user197988
- one@ IT pros then use another answer or write your own. Why all the answers minus - tutankhamun
After cd, without pressing the space bar, you can click on the desired name in Russian. It turns out that something like this cd \ name_on_english / This command does not work on mac: sudo dpkg-reconfigure console-setup