Hadoop Administration Training
Hadoop Administration
Training
Linux / UNIX Commands Tutorial
ShriHadoop
1
Hadoop Administration Training
Sr. No. Command Name Page No.
1 mkdir 3
2 ls -l 3
3 ls -la 3
4 ls -li 3
5 ls 3
6 clear 3
7 exit 3
8 touch 3
9 cd 3
10 cat 3
11 rm 3
12 rmdir 3
13 rm [-i/-r/-f] 3
14 cp 3
15 mv 3
16 man 4
17 info 4
18 help 4
19 dir 4
20 who 4
21 whoami 4
22 who am i 4
23 pwd 4
24 rpm -ivh 4
25 rpm -e 4
26 find / -name 4
27 useradd 4
28 passwd 4
29 userdel 4
30 groupadd 4
31 gruopdel 4
32 chown 4
33 chgrp 5
34 chmod 5
35 usermod 5
ShriHadoop
2
Hadoop Administration Training
Practice below commands to get proper introduction and induction of Hadoop hdfs commands.
Sr. Command Description Example
No
1 mkdir to make a new directory [cloudera@quickstart cloudera]# mkdir
newdirname
2 ls -l for listing the files as well as [cloudera@quickstart cloudera]# ls -l
directories those are kept in the
particular working directory
3 ls -la same as 'ls -l'but by this command [cloudera@quickstart cloudera]# ls -la
we can also see the hiden files
4 ls -li same as 'ls -la' but it will also shows [cloudera@quickstart cloudera]# ls -li
us the inode number of each and
every file
5 ls by this command we can see only file [cloudera@quickstart cloudera]# ls
name nothing else
6 clear it will clear the screen(short cut ctl+l) [cloudera@quickstart cloudera]#clear
7 exit to end a current session as well [cloudera@quickstart cloudera]exit
current terminal logging
8 touch to create a new empty file [cloudera@quickstart cloudera]#touch
9 cd to change the working/present [cloudera@quickstart cloudera]#cd
directory /home/cloudera
where '/home/cloudera' is the desired
directory to be change
10 cat to view the contents of a file and it is [cloudera@quickstart cloudera]#cat <file
also used for creating a new file with name>
some contents
11 rm to remove a empty file [cloudera@quickstart cloudera]#rm filename
12 rmdir to remove a empty directory [cloudera@quickstart cloudera]#rmdir
directoryname
13 rm [-i/-r/-f] to remove a directory with its [cloudera@quickstart cloudera]#rm -i
subdirectories as well as its files that directory/filename
is to remove a directory which -i stands for interactively
already contains some files in it -r stands for recursively
-f stands for forcefully
14 cp to copy something in a destination [cloudera@quickstart cloudera]#cp
file or directory sourcepath destinationpath
15 mv to move one file or directory from [cloudera@quickstart cloudera]#mv source
one place to another place, it is also destination
used for renaming adirectory or file
ShriHadoop
3
Hadoop Administration Training
16 man to view the mannual page of [cloudera@quickstart cloudera]#man
commands for syntax commandname
17 info to view the information about any [cloudera@quickstart cloudera]#mkdir info
command
18 help to view the help documents of a [cloudera@quickstart
command cloudera]#commandname –help
19 dir to view the subdirectories and filesn [cloudera@quickstart cloudera]#dir
under the directory
20 who by this command you can see the [cloudera@quickstart cloudera]#who
user name and their ip addresses
who have loged in on your server
21 whoami this command shows your current [cloudera@quickstart cloudera]#whoami
logged in terminal user name
22 who am i this command shows you the logged [cloudera@quickstart cloudera]#who am i
in terminal number and user name
and more detailed information
23 pwd to view the present working [cloudera@quickstart cloudera]#pwd
directory
24 rpm -ivh to intall a rpm package [cloudera@quickstart cloudera]#rpm -ivh
packagename.rpm rpm stands for 'redhat
package manager'
-i stands for install
-v stands for verbose mode
-h stands for with hash sign(#)
25 rpm -e to uninstall a rpm package [cloudera@quickstart cloudera]#rpm -e
package
26 find / -name to find any file or directory in linux [cloudera@quickstart cloudera]#find / -
file system name filename
27 useradd to create a new user [cloudera@quickstart cloudera]#useradd
username
28 passwd to give a password of a user [cloudera@quickstart cloudera]#passwd
123456
29 userdel to remove a user from linux [cloudera@quickstart cloudera]#userdel
username
30 groupadd to add a new group [cloudera@quickstart cloudera]#groupadd
groupname
31 gruopdel to delete a group [cloudera@quickstart cloudera]#groupdel
groupname
32 chown to change the ownership of a file or [cloudera@quickstart cloudera]#chown
directory ownername filename
ShriHadoop
4
Hadoop Administration Training
33 chgrp to change the group ownership of a [cloudera@nettec cloudera]#chgrp
file or directory newgroupownername filename
34 chmod to change the permission of a file or [cloudera@nettec cloudera]#chmod value
directory fileordirectoryname
35 usermod to modify the user profile [cloudera@quickstart cloudera]#usermod -
parameter groupname username
ShriHadoop
5