• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to disable auto completion (tab completion) in bash shell

by admin

Disabling auto-complete feature globally for all the users

With bash shell you would usually have the auto completion feature turned on by default. To disable the auto complete feature of the Bash shell for all the users of the system, you can add the following parameter in the file /etc/inputrc:

# vi /etc/inputrc
set disable-completion on

This disable the auto complete feature of bash shell for all the users on the system. After saving the file, users will have to logout and login again for the changes to be reflected.

Disabling auto-complete feature per user only

In case you need to disable auto complete feature for a particular user only, then you will have to copy the /etc/inputrc file to the user’s home directory and add the same parameter.

For example, for the user “john” do the following:

# su - john
# cat /etc/inputrc  > ~/.inputrc
# echo "set disable-completion on" >> ~/.inputrc
# exit

Now you will notice that tab completion is disabled for the “john” user only.

Reverting the changes back

To revert back, just change the parameter to “set disable-completion off” in the file /home/[user]/.inputrc or /etc/inputrc and login again.

Filed Under: Linux

Some more articles you might also be interested in …

  1. emerge Command Examples in Gentoo Linux
  2. How to Create a Bridge Interface Using nmcli in CentOS/RHEL 7 and 8
  3. chacl Command Examples in Linux
  4. Mac Terminal diskutil Command Examples
  5. mate-search-tool: command not found
  6. chntpw Command Examples in Linux
  7. Anonymous User Fails to Upload File to VSFTP Server
  8. CentOS / RHEL 7 : Enable NTP to start at boot after fresh install (disable chrony)
  9. id Command Examples in Linux
  10. UNIX / Linux : Send mail with attachment using mutt

You May Also Like

Primary Sidebar

Recent Posts

  • raw: command not found
  • raw Command Examples in Linux
  • rankmirrors Command Examples in Linux
  • radeontop: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright