What is true about the file .profile in a user’s home directory?
A. It must be executable.
B. It must call the binary of the login shell.
C. It must use a valid shell script syntax.
D. It must start with a shebang.
E. It must be readable for its owner only.
E is incorrect.
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
I think the correct answer is C.
When opening Terminal in BASH on Ubuntu Linux, the program automatically searches for a PROFILE file and executes it line by line as a shell script.
Em meu Centos esta 644, não seria a letra C ?