2.5. Exercises
Most of what we learn is by making mistakes and by seeing how things can go wrong. These exercises are made to get you to read some error messages. The order in which you do these exercises is important.
Don’t forget to use the Bash features on the command line: try to do the exercises typing as few characters as possible!
2.5.1. Connecting and disconnecting
- Determine whether you are working in text or in graphical mode.
I am working in text/graphical mode. (cross out what’s not applicable)
- Log in with the user name and password you made for yourself during the installation.
- Log out.
- Log in again, using a non-existent user name
→ What happens?
2.5.2. Passwords
Log in again with your user name and password.
- Change your password into P6p3.aa! and hit the Enter key.
→ What happens?
- Try again, this time enter a password that is ridiculously easy, like 123 or aaa.
→ What happens?
- Try again, this time don’t enter a password but just hit the Enter key.
→ What happens?
- Try the command psswd instead of passwd
→ What happens?
New password
- Unless you change your password back again to what it was before this exercise, it will be
P6p3.aa!. Change your password after this exercise! Note that some systems might not allow to recycle passwords, i.e. restore the original one within a certain amount of time or a certain amount of password changes, or both.
2.5.3. Directories
These are some exercises to help you get the feel.
- Enter the command cd
blah
→ What happens?
- Enter the command cd
..
Mind the space between cd and ..! Use the pwd command.
→ What happens?
- List the directory contents with the ls command.
→ What do you see?
→ What do you think these are?
→ Check using the pwd command.
- Enter the cd command.
→ What happens?
- Repeat step 2 two times.
→ What happens?
- Display the content of this directory.
- Try the command cd
/
→ What happens?
→ To which directories do you have access?
- Repeat step 4.
Do you know another possibility to get where you are now?
2.5.4. Files
- Change directory to
/ and then to etc. Type ls; if the output is longer than your screen, make the window longer, or try Shift+PageUp and Shift+PageDown.
The file inittab contains the answer to the first question in this list. Try the file command on it.
→ The file type of my inittab is …..
- Use the command cat
inittab and read the file.
→ What is the default mode (runlevel) of your computer?
Not every distribution has this file. Ubuntu Edgy Eft doesn’t.
- Return to your home directory using the cd command.
- Enter the command file
.
→ Does this help to find the meaning of .?
- Can you look at
. using the cat command?
- Display help for the cat program, using the
--help option. Use the option for numbering of output lines to count how many users are listed in the file /etc/passwd.
2.5.5. Getting help
- Read man
intro
- Read man
ls
- Read info
passwd
- Enter the apropos
pwd command.
- Try man or info on cd.
→ How would you find out more about cd?
- Read ls
--help and try it out.
Answer Key
Prev: Summary
Home
Next: About files and the file system
Copyright (c) by the authors.
This section of the wiki is licensed under the terms of the GNU Free Documentation License.
See the LBook-licensing page for details.
Linux® is a registered trademark of Linus Torvalds.
Welcome to LinuxBasics.org - The online community that helps people to get Linux installed and running.
During this tour, we will guide you through our website, which has many facets which wait to be explored
The biggest project we are running is our Linux course, based on the LBook.
The book is stored in wiki-format, which enables us to update and correct it as we go.
Discussion for the course is on our Forum
Our Forum is used for discussion of Linux and for questions and answers.
Search the mailing-list that was used prior to the Forum.
The questions and answers from the list are stored in the list's archives in order to help others with the same problems.
Every weekend, we meet to chat in IRC. These meetings are NOT mandatory, but are a nice chance to get to know each other better.
IRC is also a great tool to solve many problems, since it is very quick and easy to ask for more details if you need them.
The tutorials are one of the oldest sections on the LBo-website.
Here you find explanations on how to do specific tasks in Linux. Many of the tutorials were created after a certain problem
has been discussed (and usually solved :) on the mailing-list.
The tutorials are categorized in
In the links section, you find outbound links to other valuable resources.
One of our later additions to the site. We maintain a mirror of the Linux Documentation Project. This is our contribution to the "home of the HOWTOs"
Another later addition is the LBlog which focuses on how to do stuff on the Linux Desktop. It begins with the basics on installing Ubuntu.
Using the integrated site-search, you can search the tutorials, the LBook and all other wiki-pages
Simply type the search term into the box in the upper-right corner of our webpages
As a community, we depend on your feedback and collaboration. So, if you have something to share with others, please contact us. If you have a suggestion for a topic you would like to see covered here, please add it on the Wishlist.
There are many ways to contribute: You can answer questions on the Forum, you can write a complete tutorial or just a step-by-step documentation on how you completed a specific task using linux. Ask questions if the information on this site is not clear, tell us if we got something wrong, spell-check our writings, whatever.
We are looking forward to meeting you at LinuxBasics.org
Anita, Jisao, Sam and Stefan