1. The specific settings which an unix user usually does is:
A typical ksh profile file will look as shown below:
#cat $HOME/.profile
export PATH=$PATH:~blogger/bin
export LIB_IND="1"
alias l="ls -lrt"
#
The content of the other profile will depend on the syntax of
the respective shell.
Any changes made to the profile file will reflect by either of the
following ways:
1. Login to the user account again.
2. Source the profile file. Sourcing the profile file means running
the profile file at the command prompt.
The command to run the profile file, say .profile is:
. $HOME/.profile
In case of sourcing the profile file in tcsh or csh, the command is:
source $HOME/.login
2. add the directory $HOME/bin to your PATH
cd $HOME
export PATH=/usr/java/<JDK Directory>/bin:$PATH
Use the source command to force Linux to reload the .bashrc file which normally is read only when you log in each time.
source .bashrc
What does your .profile file say is your default PATH? (what command did you use). What...
2. [5] What is the command used to limit the default permissions for new file and new directory? Please write the command to set the default file permission to -rw- and default directory permission to drwx--x-x
e) In the context of Unix file system , what does "path"
means?
f) Write down the absolute path for the main.cpp in the
timeproj directory
g)Write down the relative path from inside timeproj directory to
the prgm1.cpp file
h)Write down the Unix commands and key strokes needed to create
a new sourcefile named time.cpp and then save it to disk using the
pico editor.
i) In Unix each file has three access modes, namely r,w, and
x.
1) Write...
1. Explain the difference between the /etc/profile and the ~/.bash_profile file. Which one is executed first? 2. Edit your .bash_profile file as follows: 1. Welcome the user 2. Add your home directory to the path if it is not there 3. Set erase to the Backspace key using stty. 4. Type source .bash_profile. What is the function of the source command? 3. What is the default primary prompt? 1. Change the prompt to include the time of day and your...
Login to Suse Linux as root. Complete the task working as the root user. 1. What is your current directory. What did you enter at the command prompt to determine your current working directory? 2. Change directories if needed to find your foods (or food) file. Use vi to make the file contain 10 food items. Save your file and quit. Use the cat command, and option, and the argument food to display the food file with numbered lines. Use...
Question 11 You are in the oranges directory. Write the command to copy the mandarin file to the apples directory. Use a relative path. 2 points Question 12 Which command do you use to rename files and directories? A. uname B. mv C. rn D. rename 2 points Question 13 You are in the oranges directory. Write the command to list...
Linux 13. Use the command: set | less. What does the set command do? 14. What is the purpose of the variables: PS1, HOME, PWD, PATH? 15. Use the command: echo $PS1. Why did you have to use the dollar sign with the variable name? What did it do? 16. Use the command: PS1="This is my new prompt: #". What did it do?
Cybersecurity Fundamentals Lab #9: Access ControlName: ____________________ If your Kali VM is already up and running, login to the root account on the VM via ssh. It does not matter whether you use a command line or GUI sshclient. If your VM is not currently up, use the vSphere web client to start your VM before logging into it via ssh.1: Create an Unprivileged User For some labs, including this one, we will need a non-root user account on the...
Unix questions, i need help on Hint: Commands to study to answer this question: predefined shell variables, and .profile script file, echo SHELL, HOME, PATH, MAIL and TERM are predefined shell variables. You can use the value of a shell variable in a shell command putting $ in front of it. For example, to display the value of the HOME directory of the user, specify $HOME in the echo command like echo $HOME. Do not give just the value of...
Create a new file and create a hard link and a symbolic link to it. Use vim or redirection to add content of the original file, then use cat and wc to examine each of the two aliases that you created. How does the result prove or disprove that either alias is a copy of the original file? In your home directory create a hard link and a symbolic link to one of the commands that you know how to...
QUESTION 1 From YOUR home directory, execute a find command string that will locate the file called resolv.conf. Include the -exec flag in the find command to cat the file to the screen. Begin your find search from the letc directory. Select the correct find command string below that will accomplish this. find /etc -name 'resolv.conf-cat f} \; find /etc -name 'resolv.conf' -exec cat {} \; find . -name 'resolv.conf' -exec cat {} \; O find / -name 'resolv.conf' -exec...