Open In App

Types of User Profile Management in LINUX

Last Updated : 08 Jun, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

User profile management is an essential topic in the profile management system, and it describes how the user can handle the profile. Various types of user-profiles management in Linux are –

  • bashrc
  • bash_profile
  • bash_history
  • bash_logout

bashrc

Procedures

  • Open the terminal and add the user.
useradd t1
  • Switch as a user.
su - t1 
  • Create a file and type the ls command to view the file.
touch file{1..10}.txt
ls
  • Set alias to the particular command and make an entry in the configuration file.
alias data=ls
vim .bashrc
  • restart the terminal

source .bashrc
  • Type the aliased command to view the same file.

bash_profile

 bash_profile cmd is used to change the color of a directory, file, etc.

Procedures

  • Switch as a user
su - t1
  • Create directory and file
mkdir file (directory)
touch data.txt (file)

  • Open the configuration file and make an entry for directory and file to change the previous color
vim .bash_profile
LS_COLORS="di=1:31" for directory color change
LS_COLORS="fi=1:32" for file color color change

  • reload the file and list the file and directory
source .bash_profile
ls

bash_history

 bash_history cmd used to list all the used commands previously.

Procedure

  • Type the vim .bash_history to view the previously used commands.

bash_logout

 bash_logout cmd is a macabre command and handle with care command. It runs the script when we reload the file.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads