Learn about basic Linux Commands
Practice with basic commands in
Linux lecture first.
- In the root directory create three directories.
Call them primary, secondary and junks. What commands
will you use?
- In the junks directory create a file called
my_stall Write your first name in this file and save it. What commands
will you use?
- Move my_stall into the secondary
directory. What commands will you use?
- Move my_stall into the primary and change
the name to my_first_file.log . In this directory you should only have
one file. What commands will you use?
- Draw the directory configuration for the above questions
- Find the file called yp.conf; can you find it? where
- How can you login as a different user from a terminal?
- How do you know which user you have signed in as?
- What is the difference between commands touch and
- To find out when file .emacs was generated what
command will you use?
- How do you use echo command to display the
following message: *** This is a test ****.
- What will be the purpose of running the
following command: ls /etca/*release*
- What does SU command do?
- What does ping do? what command can you use to ping?
- What does ifconfig command do?
- What can you do with chmod command. Make an
- Using vi, how can you search for a
string such as "name" in a file? What command will you use?
command allows you to find the file called .bash_profile
- Let's say you are logged on as the system administrator.
Assuming .bash_profile file contains user specific environment
and startup programs and it is located in the home directory of each user,
where will be location of the file?
- Display the .bash_profile file.What is the
first line of .bash_profile file?
- Explain the sequence of commands you use to create the
- Assuming you are the system admin, what is your home directory (all
filenames and directory names are lower case) ?
- Write the command to create a directory called myprofile
- Write the command to create a file called mytest.txt in the above
- Write the command to copy mytest.txt into yourtest.txt
- Write the command to copy mytest.txt into ourtest.txt
- At this point, write the name of all the files in myprofile