Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Activty 2 Command Line Skills For Systems Administration Fundamentals

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Activity No.

2
Command Line Skills
Course Code: CPE231 Program:
Course Title: SYSTEM ADMINISTRATION FUNDAMENTALS Date Performed:
Section: Date Submitted:
Name: Instructor:
1. Objective(s):

This activity aims to execute basic commands using command line interface of Linux.

2. Intended Learning Outcomes (ILOs):


The students should be able to:
2.1 Demonstrate how to use commands to explore BASH features.
2.2 Demonstrate how to use commands to display the values of Shell variables.
2.3 Demonstrate how to use quoting in Bash shells.

3. Discussion :

<create a discussion about Shell, Bash Shell, Linux Commands, Arguments and Options, History,
Different Command Types, Shell Variables and Quoting >

4. Resources:
Personal Computer with installed Virtual Box
Ubuntu Server or Desktop virtual machine

5. Procedure:

1. Login using your username and password.


2. Use terminal emulator application (if you are using desktop version)
3. Execute the following commands. Copy a screenshot as output after you execute the given command.
Create a brief explanation of the command.

Command Screenshot Explanation


1. ls -l
2. ls -l ./Documents
3. whoami
4. Uname
5. pwd
6. echo Hi
7. history
8. history 5
9. !9
10. echo Hello
Student
11. echo $HISTSIZE‌
12. echo $PATH
13. which date
14. type cd
15. type ls
16. alias
17. type vi
18. cd /bin
19. type vlc
20. cd
21. echo Today is
`date`
22. echo Today is $
(date)
23. echo This is the
command '`date`'
24. echo This is the
command
\`date\`
25. echo This is the
command
"`date`"
26. echo D*
27. echo "D*"
28. echo Hello; echo
Linux; echo
Student
29. false; echo Not;
echo Conditional
30. echo Start &&
echo Going &&
echo Gone
31. echo Success
&& false &&
echo Bye
32. false || echo Fail
Or
33. true || echo
Nothing to see
here
34. printenv
35. printenv TERM
36. echo $TERM
37. env
7. Supplementary Activity:

Copy screen shot(s) of the following tasks:

1. An alias can be used to map longer commands to shorter key sequences. Use an alias to
represent a very long command.
2. Create a new directory in the Documents directory. Rename the directory as CPE_231_(lastname).
Create a new file inside the CPE_231_(lastname) directory. Rename the file as
sample1_lastname.txt. Display the content of the CPE_231_(lastname) directory by executing one
line of command only.
3. Execute a command to display the working shell.
4. Shell variables, called environment variables, have the string data type and typically are named
with capital letters and the _ (underline) character. Names are case sensitive. The env command
will list all the environment variables. The printenv command will list all or will list only the names
on its command line. List all environment variables. Which start with P?
__________________________________

7. Problem Analysis:

1. Execute ls $HOME. Now execute ls $HOME/.[a-z]* . Explain the difference of the two commands.
2. Differentiate internal commands from external commands.
3. To change an existing environment variable in the current terminal session, export DOG="hi there"
Try it. What command would print the value of DOG? _____________________________

8. Conclusion

8. Assessment (Rubric for Laboratory Performance):

You might also like