1st Day in Internship
Learned Linux commands
1. Assignment 1 =
Linux Command
-
Create a new user (preferably using your name as login name)
I have done this .
Command : sudo
adduser newuser
-
Reset password of user
I have done this .
Command : sudo
passwd user_name
-
Create a directory called my_group at home and give permissions to user and group
Here I created a
directory . I tried this chmod command for the permissions for the
users. And also I tried
usermod -aG sudo
commands.
-
Create a directory called my_user at home and give permissions to user only
Here I created a
directory . I tried
usermod -aG sudo
commands.
-
How many network interfaces your computer has?
Answer is 2.
I used
ls
-A /sys/class/net
this
commands
-
Install xmind on your desktop without using yum.
I installed it.
-
How you get last 5 entries of /var/log/messages
I have done this.
Command : tail -n
5 /var/log/syslog
-
How you get first 5 entries of /var/log/messages
I have done this.
Command : head -n
5 /var/log/syslog
-
How you get log entries of /var/log/messages which printed within today
I couldn’t
complete this.
-
How many lines in /var/log/messages?
I have done this.
Command
:
wc
-l /var/log/
syslog
-
How many unique lines in /var/log/messages?
I used uniq
/var/log/syslog command to find the unique lines in var messages.
-
Sort directory/file list based on time inside your home directory.
I have done this.
Command : ls -ltcr
-
Access you friends machine using ssh and copy a file to there.
I first installed
the ssh . But I couldn’t complete this.
-
Copy file which reside on your machine to your one using shell at you machine.
I couldn’t
complete this.
-
Rename your directory my_group to my_group1
I have done this.
Command
:
mv
/home/user/oldname /home/user/newname
-
How you view partition information?
Command : sudo
parted -l
-
How you get total sizes of sub directories inside /var using single command?
Command : du -s
directory_name
-
Change system date to yesterday using command line
I have got the
date but I couldn’t change it using the terminal commands.
-
Remove directory my_group
Command : rmdir
directory_name
-
What are the following utilizations of your desktop
computer's
usage of processing resources, or the amount of work handled by a
CPU.
Actual CPU utilization
varies depending on the amount and type of managed computing tasks.
-
Memory
stores input
data, intermediate results, programs, and other information
temporarily. It can be read and/or written. It is usually volatile,
that is all data will be lost when the power is turned off.
-
Disk
0 Comments