Command line usage with dyslexia
I am new to Linux, and being dyslexic, find working from a command line a challenge. What aids or advice is available to help work with this issue?
Solution 1:
You may try a few to things to improve your experience with the command line.
- Use tab completion (automatically fill in partially typed commands by pressing Tab) whenever possible.
- Press ↑ (up arrow key) to automatically print the last command, and keep pressing ↑ & ↓ (up & down arrow keys) to cycle through the command history.
- Drag a file into the terminal to automatically print the complete path.
- Press Alt+. (dot) to insert the last argument from the last command you executed (useful for e.g.
mkdir
followed bycd
). - Use keyboard shortcuts (see this and this).
- Use Bash aliases (see this and this).
- Use
history
, you can view the command history and then use the number of the historical command to re-execute the command (e.g., redo command #352 with!352
). Alias it to simplyh
for quick and easy access. - Use a reverse terminal search (Ctrl + R, then start typing) to match earlier commands; it's a quick way to find things from earlier.
- Use a shell that completes commands and optional arguments such as Zsh or fish.
- Use a font which increases readability for readers with dyslexia, e.g. "OpenDyslexic", in Terminal.
- Hear what is on the screen as you are reading; enable a screenreader like Orca. You can have it read just one word, a whole page, spell out words letter by letter, change speed, volume, level of detail, etc.
- Enlarge a part of the screen as you are reading; take a look at apps that zoom with keyboard shortcuts, like Magnifier.
- Advanced: personalize the way the output displays, like setting conditional text colors. The default Ubuntu distro provides several enhancements to Terminal. When you use
ls
to list contents of a directory, for example, subdirectories print in blue and filenames print in white, making it easier to distinguish the two. For other examples, have a look at the many personalizations people have shared. Some are sure to be worth trying out "as is". One good starting point is the popular Awesome dotfiles repository.
Solution 2:
I will attempt a comprehensive answer. If I left something out, please comment and I will add it.
Tab completion
Tab completion is your biggest help here. Pressing Tab will complete the command as as far as is uniquely identifiable. Pressing Tab twice will give a list of options. Typing enough caracters to Identify which option you want and pressing Tab again will complete it. This also works with path/file names.
For example, let's say I have a user named Paul, and he has the file text123.txt and text124.txt in his Downloads folder:
I could type /h Tab and bash will give me /home/
. Then type P Tab and get /home/Paul/
. And continue in this fashion until I have the complete file and path.
Path/file name expansion
Auto-completion also accepts wild cards *
and ?
. ?
matches a single character, and *
matches all characters (or none). Using the above example, I could type:
/h*/P*/Dow*/t*4*
then Tab and bash will give me /home/Paul/Downloads/text124.txt
. If I am sure that I am matching the correct file, I can just hit Enter to execute the command with out expanding it first.
Some common directory references are:
-
~
for your home directory. -
..
parent directory -
.
current directory; in case you want to absolutely sure that bash looks in the right directory.
Keyboard shortcuts
The up arrow ↑ and down arrow ↓ keys lets you navigate through a list of recently used commands. Press Ctrl+G to escape from history searching mode. Alt+. repeats the last argument of the previous command.
Aliases
Bash allows you to specify aliases. If you find that you often mistype a command the same way, you can add custom aliases by editing ~/.bashrc
and adding lines like this:
alias agi='apt-get install'
alias mkdri='mkdir'
Then relogin to activate them.
Solution 3:
The Zsh shell (or at least the version I am using, Oh-my-ZSH) has a feature that corrects you if you make small typos in command and file names:
$ pyhton scirpt.py
zsh: correct 'pyhton' to 'python' [nyae]? y
zsh: correct 'scirpt.py' to 'script.py' [nyae]? y
...
You can turn it on with the following line in your .zshrc
:
# Uncomment the following line to enable command auto-correction.
ENABLE_CORRECTION="true"
Solution 4:
You could try using the open dyslexic font in your terminal. It might help with reading the text. This is assuming that you're using the default ubuntu terminal, which I hope is the same as the GNOME terminal.
https://opendyslexic.org/
- Download it.
- Install the font.
- Open a terminal navigate to the menubar and select Edit->Profile Preferences
- Turn on custom font and select the open dyslexic mono font.