Vk 36 Tuntitehtävät

1.    Find a suitable package and install Nethack.

-sudo apt-get install nethack-x11

-I installed this packet because just install nethack didn´t work

2. Create a user group and two new users. Add the new users to the new group. Give also the other user permission to use sudo.

-sudo addgroup ryhma1

-sudo adduser user1

-sudo adduser user2

-sudo  usermod -aG ryhma1,sudo user1

-sudo usermod -aG ryhma1,sudo user2

usermod -aG
3. Do other users have permission to list contents of your home directory?

-only me and the sudo users
4. Create a new file (touch command is handy). What permissions of the file in number

– 664

touch luonti
5. What means that a directory has only x permission?

-You can see the directory but you can´t see it or change it

6. Write a shell script that prints Hello world

-First I used Nano editor and wrote the script.

shell script Hello World
7. How can you run a command once a week?

-crontab file, activate crontab with command crontab -e

-then write the cron: 30  0  *  *  5  /bin/updatedb (where every Friday 00:30 system executes given command)



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s