• 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. How to Create a Bridge Interface Using nmcli in CentOS/RHEL 7 and 8
  2. What are Bash Exit Codes in Linux
  3. pvscan Command Examples in Linux
  4. /var/cache/yum Constantly Filling Files System in CentOS/RHEL
  5. “Failed to Synchronize Cache For Repo ‘repo_name’, Ignoring This Repo” – CentOS/RHEL 8 error
  6. Linux OS Service ‘named’
  7. How to tar, untar files and view contents of tar file under Linux
  8. How To Change Pacemaker Cluster Heartbeat Timeout In CentOS/RHEL 7
  9. Understanding System Security Services Daemon (SSSD)
  10. Difference between absolute and relative paths in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright