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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • 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. grep Command Examples in Linux (Cheat Sheet)
  2. 7zr – File archiver with a high compression ratio (Command Examples)
  3. chattr Command Examples to Change File Attributes (Make files immutable)
  4. How To Increase The Retention Of “sar” Data To ‘N’ Days in Linux
  5. How to Check CentOS Version
  6. tvservice: command not found
  7. CentOS / RHEL : How to move a Volume Group from one system to another
  8. lshw Command Examples in Linux
  9. Beginners Guide to yum Configuration
  10. clear: Clears the screen of the terminal (Command Examples)

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright