0

I'm an IT student and I was asked to explore some of the functionalities of the .profile, bashrc and bash_logout files. The thing is I'm new to Ubuntu and Linux and I'm having trouble to find some example scripts to implement in those files. So far I know that: .profile: every change here applies to all users profiles. .bashrc: a script that's executed everytime I log in and also provide aliases. .bash_logout: not really sure what it does.

I'd like some information aswell as some ideas about changes I could do to those files so I can see how they work.

I was thinking in adding a Hello world script or a change terminal color in .bashrc but I don't know what to do with the other files. Would appreciate some help.

Thanks in advance.

  • 1
    See [6.2 Bash Startup Files](https://www.gnu.org/software/bash/manual/bash.html#Bash-Startup-Files) in the manual – glenn jackman Dec 07 '22 at 14:30
  • 1
    `man Bash`, http://www.tldp.org -> Bash guides. – Hannu Dec 07 '22 at 17:01
  • 1
    What does this have to do with Ubuntu? – waltinator Dec 07 '22 at 17:50
  • There are 5 such files that are usable on the average system, but you've not provided any specifics on what system you're asking about (*not all apply for all machines*). Did you look up the documentation? what if anything confused you about it? Did you try the many answers on this site? (eg. https://askubuntu.com/questions/121413/understanding-bashrc-and-bash-profile) though don't forget BASH can be replaced with another shell so other startup files exist (including the non-bash startup files that apply to all) – guiverc Dec 07 '22 at 23:10
  • FYI: If I wanted an example; I'd grab a system & start it up in a VM & look at the default as my example.. Alternatively as we're talking about open source code, I can use a browser to explore the packages on a Ubuntu system & explore the code online without actually needing to download/execute any code. There are many alternatives, with them differing if you're talking about a desktop system (where GUI maybe involved in defaults), server (no GUI thus no UI setup will exist in code so will be shorter probably) etc. – guiverc Dec 07 '22 at 23:15

0 Answers0