Question

there are several startup files which are leveraged by bash please identity the files which are...

there are several startup files which are leveraged by bash please identity the files which are used by this shell. identify the role /purpose of each file and when each files is applied/executed

Homework Answers

Answer #1

/etc/profile
Here is a base /etc/profile. This file starts by setting up some helper functions and some basic parameters. It specifies some bash history parameters and, for security purposes, disables keeping a permanent history file for the root user. It also sets a default user prompt. It then calls small, single purpose scripts in the /etc/profile.d directory to provide most of the initialization

The /etc/profile.d Directory

Now create the /etc/profile.d directory, where the individual initialization scripts are placed:

/etc/profile.d/dircolors.sh

This script uses the ~/.dircolors and /etc/dircolors files to control the colors of file names in a directory listing. They control colorized output of things like ls --color. The explanation of how to initialize these files is at the end of this section

/etc/profile.d/extrapaths.sh

This script adds some useful paths to the PATH and can be used to customize other PATH related environment variables (e.g. LD_LIBRARY_PATH, etc) that may be needed for all users.

/etc/profile.d/readline.sh

This script sets up the default inputrc configuration file. If the user does not have individual settings, it uses the global file.

/etc/profile.d/umask.sh

Setting the umask value is important for security. Here the default group write permissions are turned off for system users and when the user name and group name are not the same.

/etc/profile.d/i18n.sh

This script sets an environment variable necessary for native language support. A full discussion on determining this variable can be found on the LFS Bash Shell Startup Files page.

/etc/bashrc

Here is a base /etc/bashrc. Comments in the file should explain everything you need

~/.bash_profile

Here is a base ~/.bash_profile. If you want each new user to have this file automatically, just change the output of the command to /etc/skel/.bash_profile and check the permissions after the command is run. You can then copy /etc/skel/.bash_profile to the home directories of already existing users, including root, and set the owner and group appropriately.

~/.bashrc

Here is a base ~/.bashrc. The comments and instructions for using /etc/skel for .bash_profile above also apply here. Only the target file names are different.

~/.bash_logout

This is an empty ~/.bash_logout that can be used as a template. You will notice that the base ~/.bash_logout does not include a clear command. This is because the clear is handled in the /etc/issue file.

/etc/dircolors

If you want to use the dircolors capability, then run the following command. The /etc/skel setup steps shown above also can be used here to provide a ~/.dircolors file when a new user is set up. As before, just change the output file name on the following command and assure the permissions, owner, and group are correct on the files created and/or copied.

If you want to use the dircolors capability, then run the following command. The /etc/skel setup steps shown above also can be used here to provide a ~/.dircolors file when a new user is set up. As before, just change the output file name on the following command and assure the permissions, owner, and group are correct on the files created and/or copied.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
PLEASE WRITE A BASH SCRIPT FOR USE IN JUYPTER NOTEBOOK. Initialize a variable INPUT_FILE that stores...
PLEASE WRITE A BASH SCRIPT FOR USE IN JUYPTER NOTEBOOK. Initialize a variable INPUT_FILE that stores the name of the file 'testdata.csv'. Write an if-else statement in a shell that checks if the input file exists. If the file exists, then display a message "testdata.csv exists," otherwise display a message "testdata.csv does not exist." Initialize an array variable named 'ARR_WORDS' as below: ARR_WORDS=("naresh" "sam" " david" ) Initialize an array variable named 'ARR_COUNTS' of size equal to the length of...
1. By convention, how are configuration files separated from regular files? (NOTE: A practical effect of...
1. By convention, how are configuration files separated from regular files? (NOTE: A practical effect of the separation is that they are not displayed by the default version of the ls command)                         a. the prefix "rc" (rc.filename)               c. the extension .cfig                         b. a dot (.) at the beginning                    d. by having the SUID bit set 2. The IP address which is reserved for local loopback (equivalent to "localhost") is:                         a. 255.255.255.0                                   c. 192.168.70.1...
Some circumstances justify departures from the historical cost approaches of FIFO, LIFO, and weighted average cost....
Some circumstances justify departures from the historical cost approaches of FIFO, LIFO, and weighted average cost. Several additional inventory methods may be used when circumstances warrant. Identify and describe each of these alternative methods. Include an example of when each method may be applied. o Identify which methods could be used to determine whether there has been shrinkage or shortage in the physical inventory.
Tableau can connect to all these file types except which of the following? Text PDF files...
Tableau can connect to all these file types except which of the following? Text PDF files Excel Microsoft Access Microsoft Power BI Which of the following is least likely to be a Dimension field in Tableau? Total cost Country State Segment None of the choices are correct. Which of the following is least likely to be a Measure field in Tableau? Sales revenue Segment Total cost Quantity sold None of the choices are correct. Which of the following best describes...
Project 10-3 In this hands-on project, you view the configuration of the System Log Daemon and...
Project 10-3 In this hands-on project, you view the configuration of the System Log Daemon and the logrotate utility on Ubuntu Server Linux. 1. Boot your Ubuntu Server Linux virtual machine. After your Linux system has been loaded, log into tty1 using the user name of root and the password of LNXrocks!. 2. At the command prompt, type ls –l /dev/log and press Enter. What is the file type? Which daemon on Ubuntu Server Linux uses this file and what...
I did already posted this question before, I did get the answer but i am not...
I did already posted this question before, I did get the answer but i am not satisfied with the answer i did the code as a solution not the description as my solution, so i am reposting this question again. Please send me the code as my solution not the description In this project, build a simple Unix shell. The shell is the heart of the command-line interface, and thus is central to the Unix/C programming environment. Mastering use of...
A charitable organization relies for its funding on donations from the general public, which is mainly...
A charitable organization relies for its funding on donations from the general public, which is mainly in the form of cash collected in the streets by volunteers and cheques sent by post to the charity’s head office. Wealthy individuals occasionally provide large donations, sometimes on condition that the money is used for specific purpose. The constitution of the charity specifies the purpose of the charity, and also states that no more than 15% of the charity’s income each year may...
please unique answer, no handwriting, for safeAssign Pilgirism submission.API style Purpose The purpose of this assignment...
please unique answer, no handwriting, for safeAssign Pilgirism submission.API style Purpose The purpose of this assignment is to help you learn more about the concepts related to the role of System Analyst. Brief Introduction Suppose that you are an analyst for the ABC Company, a large consulting firm with offices around the world. The company wants to build a new knowledge management system that can identify and track the expertise of individual consultants anywhere in the world on the basis...
1. Linked Mode most closely behaves like which application? Select one: a. Active Directory b. PowerCLI...
1. Linked Mode most closely behaves like which application? Select one: a. Active Directory b. PowerCLI c. File Explorer d. Power Shell 2. NFS file shares are known as: Select one: a. Exports b. Sharables c. Commons d. Trades 3. Design decisions are grouped into which three facets? Select one: a. Organizational, operational, mechanical b. Mechanical, operational, technical c. Operational, technical, environmental d. Technical, operational, organizational 4. How much should you add to the overhead estimate when calculating the required...
A recent penetration test revealed several issues with a public-facing website used by customers. The testers...
A recent penetration test revealed several issues with a public-facing website used by customers. The testers were able to: Enter long lines of code and special characters Crash the system Gain unauthorized access to the internal application server Map the internal network The development team has stated they will need to rewrite a significant portion of the code used, and it will take more than a year to deliver the finished product. Which of the following would be the BEST...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT