Как настроить и оптимизировать SSD для Ubuntu, Linux Mint
Включить TRIM
TRIM (команда Trim позволяет ОС знать, какие блоки SSD не используются и могут быть удалены)
Сначала создайте резервную копию fstab в случае, если что-то не так.
# cp /etc/fstab ~/fstab.bk
Редактировать файл fstab
# nano /etc/fstab
Добавить отменить на свои диски или разделы ssd после ext4
UUID=bef10b86-494d-41c6-aa46-af72cfba90fd / ext4 discard,errors=remount-ro 0 1
Adding noatime and nodiratime
noatime и nodiratime - опции монтирования в linux для файловой системы Linux. noatime отключает обновления atime в файловой системе, а nodiratime отключает обновления atime в системе каталогов.
Изменить файл fstab
# nano /etc/fstab
Добавить noatime, nodiratime к вашим дискам или разделам ssd, после ext4
Добавлять noatime, nodiratime в ваши ssd-диски или разделы, после ext4 ]UUID=bef10b86-494d-41c6-aa46-af72cfba90fd / ext4 discard,noatime,nodiratime,errors=remount-ro 0 1
Да, вы можете использовать команду bind
bind '"\ey"':"\"less \C-m\""
, которая отображает Alt-e в команду less и выполняет ее (с помощью \ Cm aka Ctrl-m)
Вероятно, для | вам нужно избежать этого.
bind '"\ey"':"\"\|less \C-m\""
Если вы хотите просто добавить его в командную строку, удалите * \ Cm \ ""
Будьте осторожны, поскольку уже есть некоторые привязки Определено:
Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + L Clears the Screen, similar to the clear command
Ctrl + U Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
Ctrl + H Same as backspace
Ctrl + R Let’s you search through previously used commands
Ctrl + C Kill whatever you are running
Ctrl + D Exit the current shell
Ctrl + Z Puts whatever you are running into a suspended background process. fg restores it.
Ctrl + W Delete the word before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + T Swap the last two characters before the cursor
Esc + T Swap the last two words before the cursor
Alt + F Move cursor forward one word on the current line
Alt + B Move cursor backward one word on the current line
Tab Auto-complete files and folder names
Клавиша управления, как вы можете видеть выше, выполняется с помощью Cm, поэтому вы можете запустить меньшую команду с помощью Ctrl-g, как показано ниже:
bind '' \ Cg "':" \ "\ | less * \ Cm \" "
Чтобы получить коды клавиш для Alt (только для ALT), вы можете использовать команду чтения из оболочки :
@~$ read
^[y
^ [y равно \ ey
Для получения дополнительной информации на этот вопрос был дан ответ также в stackoverflow:
https: // stackoverflow .com / вопросы / 4119991 / Баш-колл-скрипт-с-заказной-клавишных-ярлыки
Да, вы можете использовать команду bind
bind '"\ey"':"\"less \C-m\""
, которая отображает Alt-e в команду less и выполняет ее (с помощью \ Cm aka Ctrl-m)
Вероятно, для | вам нужно избежать этого.
bind '"\ey"':"\"\|less \C-m\""
Если вы хотите просто добавить его в командную строку, удалите * \ Cm \ ""
Будьте осторожны, поскольку уже есть некоторые привязки Определено:
Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + L Clears the Screen, similar to the clear command
Ctrl + U Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
Ctrl + H Same as backspace
Ctrl + R Let’s you search through previously used commands
Ctrl + C Kill whatever you are running
Ctrl + D Exit the current shell
Ctrl + Z Puts whatever you are running into a suspended background process. fg restores it.
Ctrl + W Delete the word before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + T Swap the last two characters before the cursor
Esc + T Swap the last two words before the cursor
Alt + F Move cursor forward one word on the current line
Alt + B Move cursor backward one word on the current line
Tab Auto-complete files and folder names
Клавиша управления, как вы можете видеть выше, выполняется с помощью Cm, поэтому вы можете запустить меньшую команду с помощью Ctrl-g, как показано ниже:
bind '' \ Cg "':" \ "\ | less * \ Cm \" "
Чтобы получить коды клавиш для Alt (только для ALT), вы можете использовать команду чтения из оболочки :
@~$ read
^[y
^ [y равно \ ey
Для получения дополнительной информации на этот вопрос был дан ответ также в stackoverflow:
https: //stackoverflow.com/questions/4119991/bash-call-script-with-customized-keyboard-shortcuts