Centos Bash Commands

From rbachwiki
Revision as of 21:26, 29 January 2019 by Bacchas (talk | contribs)
Jump to navigation Jump to search

Check Bash Shells installed

cat /etc/shells

Check who is logged on

id
whoami
w
who

Check type of System

uname -a

File Commands

locate filename

The locate command looks in a premade database that contains a list of all the files on the system. This database is indexed much like a textbook for fast searching, yet can become outdated as files are added and removed from the system, which happens on a regular basis. As a result, the database used for the locate command (/var/lib/mlocate/mlocate.db) is updated each day automatically and can be updated manually by running the updatedb command at a command prompt. You can configure the directories that are searched by the updatedb command by editing the /etc/updatedb.conf file.