Font size
WorksheetsLFAD - MIDTERM
Total questions: 100
Worksheet time: 50mins
intended to make a Linux operating system easy to use for non-programmers and generally corresponds to the Windows desktop interface and its most common set of applications. In fact, __allows the user to select one of several desktop appearances.
GNOME
Userdel
Shell
is a command use to delete a user profile account.
GNOME
Userdel
Shell
command is used to Create a group account.
GNOME
Userdel
groupadd
a command use delete an existing Group account.
groupdel
Userdel
groupadd
a command used to add an Existing account to an existing group account
groupdel
usermod
groupadd
You can also display the list of user and group accounts Using terminal just simply press __ to switch on Single user text mode terminal.
ctrl + alt + f1
ctrl + f1
ctrl + alt + f3
this command is used to assign a password for the user account it will automatically hide the information password of the user.
groupdel
Password [account name]
groupadd
Using the octal notations table instead of ‘r’, ‘w’ and ‘x’. Each digit octal notation can be used of either of the group ‘u’,’g’,’o’:
chmod ugo+rx [file_name]
Password [account name]
groupadd
is a letter used to specify an option Wherein the list of supplementary can be specified, which the user should become a member of
G
Inode
Inode number
consider as a database of a file it contains many information about the file
G
Inode
Inode number
it refers to the physical file, the data stored in a particular location
G
Inode
Inode number
In Linux, the __ file stores the user information, such as the user's name, UID, group id (GID), user's home directory, and user's shell. We can get the username by parsing.
/etc/passwd
Inode
Inode number
Type ___ into the terminal, replacing “/path/to/file” with the file you want to give permissions to everyone for, and press “Enter.”
/etc/passwd
sudo chmod a+rw /path/to/Sample1
Inode number
to allow executable permissions.
/etc/passwd
sudo chmod a+rw /path/to/Sample1
Chmod +x filename
are core to the security model used by Linux systems. They determine who can access files and directories on a system and how.
File permission
sudo chmod a+rw /path/to/Sample1
Chmod +x filename
The first field of the __ output is a group of metadata that includes the permissions on each file.
ls -l
sudo chmod a+rw /path/to/Sample1
Chmod +x filename
The R means you can “__” the file’s contents.
read
write
other
If any of the “rwx” characters is replaced by a __, then that permission has been revoked.
ls -l
-
=
The first argument you give to the __command is ‘u’, ‘g’, ‘o’.
chmod
sudo chmod a+rw /path/to/Sample1
Chmod +x filename
Now you would type a ‘+’ to say that you are “adding” a permission:
chmod
chmod o+
Chmod +x filename
Then using __ sub user name user1 Is already created.
chmod
chmod o+
Cat/etc/passwd
The command for changing directory permissions for group owners is similar, but add a “g” for group or “o” for users: foldername:
chmod o-rwx
chmod o+
Cat/etc/passwd
to give only read permission for everyone.
chmod o-rwx
chmod a=r foldername
Cat/etc/passwd
You can use multiple__statements to perform a multiway branch. However, this is not always the best solution, especially when all of the branches depend on the value of a single variable.
chmod o-rwx
chmod a=r foldername
case .. esac
is a command-line interpreter and typical operations performed by shell scripts include file manipulation, program execution, and printing text
Shell
database
gnome
A __ is the string of directories and sub-directories you would have to navigate through in order to reach a given location in the le system Linux Suse Enterprise Server.
Shell
path
gnome
To have__ means to be logged in using the root account. This can be done from the main login screen, a shell prompt, or any application that requires your root password. Root access means that the user has permission to do anything on the system, so use root access with care.
Shell
path
Root access
It also called a file format, is the layout of a file -- in terms of how the data within the file is organized.
Shell
File extensions
Root access
gz. a file compressed with gzip
abc.gz.
.tbz or .tar.bz.
Posix
a tarred and bzipped le
abc.gz.
.tbz or .tar.bz.
Posix
The conventional __ permission concept uses three classes of users for assigning Permissions in the file system: the owning user, the owning group and other users.
abc.gz.
.tbz or .tar.bz.
Posix
The ACL contains two entries, one for the name user __ and one __entry.
James and Mask
.tbz or .tar.bz.
Posix
is a computer program designed to be run by the Unix/Linux shell.
James and Mask
Shell script
Posix
The following script uses the __ command which takes the input from the keyboard and assigns it as the value of the variable PERSON and finally prints it on STDOUT.
Read
write
Posix
It provides you with an interface to the Unix system. It gathers input from you and executes programs based on that input
Read
Shell
Posix
The prompt __, which is called the command prompt
$
*
^
If you are using a __, the $ character is the default prompt.
abc.gz.
Bourne-type shell
Posix
Move forward one word ( delimited by a white space )
W
O
R
Jumps to the previous paragraph
{
}
'
Jump to the end of the next section
][
{}
()
to Insert text at the end of the line.
A
G
O
to insert the file, below the cursor
:r [ filename]
:g [ filename]
:l [ filename]
Delete to the end of sentence
D)
g
a
Replace the character under the cursor with
r{txt}
w{txt}
r(txt)
to paste from register x before current line
[:x]P
(v)P
[:x]s
to Redo the last undo.
Ctrl + r
r{txt}
:r [ filename]
Switch case
~
/
-
Creating a Syntax for zip file
$zip myfile.zip filename.txt
chmod o+
K or ctrl + j.
Bourne shell is usually installed as __ on most versions of Unix.
$zip myfile.zip filename.txt
/bin/sh
K or ctrl + j.
The basic concept of a shell script is a list of commands, which are listed in the order of execution. A good shell script will have comments, preceded by __ sign, describing the steps.
$zip myfile.zip filename.txt
#
K or ctrl + j.
The __ statement in the Unix shell is very similar to the switch...case statement we have in other programming languages like C or C++ and PERL, etc
Variables
CASE … esac
K or ctrl + j.
can contain only letters (a to z or A to Z), numbers ( 0 to 9) or the underscore character ( _).
Variables
CASE … esac
K or ctrl + j.
Variables are defined as follows -
Variables
CASE … esac
variable_name=variable_value
is used to locate /search file in linux or Unix
Find
look
search
Display full details on matches
–Ls
lss
search
Display path to binaries
–Ls
lss
–b
text editor was the brainchild of Bram Moolenar, a Dutch software engineer.
–Ls
Vim
–b
The following script will access the value of defined variable
NAME and print it on STDOUT –
#!/bin/sh
NAME="James "
echo $NAME
James
NAME
bin
The exit status of the last command executed is
$
!
~
The following script generates an error while trying to change the value of
NAME – #!/bin/sh
NAME="Emma"
readonly NAME
NAME="Hello world!!"
main.ksh: line 5: NAME: is read only
main.ksh: line 5: Bin: is read only
main.ksh: line 5:
is a variable that is present within the current instance of the shell. It is not available to programs that are started by the shell. They are set at the command prompt.
Local Variable
Object
Folder
is available to any child process of the shell. Some programs need environment variables in order to function correctly.
Local Variable
Environment Variable
Folder
All the arguments are individually double quoted. If a script receives two arguments, $@ is equivalent to $1 $2
$@
$!
$ =
There are special parameters that allow accessing all the command-line arguments at once. __ both will act the same unless they are enclosed in double quotes, "".
$@
$ and $@
$ =
Last line mode
/
:
;
Insert mode
/
|
;
Move cursor one character to the left
W
R
H
Move cursor up one line
K or ctrl + a
K or ctrl + j
K or ctrl + s
This option is used when we want to append the output, retaining the prior content of the file.
+a
–a
-s
This option is used when we want to run a particular command rather than interactive shell and get terminal information in the file given as argument or typescript by default
+a
–a
-c
if you want to search a particular information the postal code from a text file.
Control command
Grep command
command
shows the matching line and its number.
+a
–n
-c
matches both (upper and lower) case.
+a
–n
-i
This command helps in sorting out the content of a file alphabetically.The syntax is
Sort abc
Sort a
Sort m
This symbol send the output of one command as input of another command
+a
+
|
These are small accounts created inside the linux operating system linux accounts are useful especially if you are going to create a workstation
group1
user1
user4
This symbol send the output of one command as input of another command
+a
-j
-v
Same as :ql! Without writing changes
ZQ
SR
BR
The filename of the current script
$0
$9
$06
These variables correspond to the arguments with which a script was invoked
$N
$J
$A
The Pipe is a command in Linux that lets you use two or more commands.
FACTS
MYTHS
Locate searching tool is used to search for file index that actual file name.
FACTS
MYTHS
The three user class are the owner,group and others
FACTS
MYTHS
To add permissions for a group (group is either the group name or ID): # setfacl -m "g:group:permissions"
FACTS
MYTHS
The path of the Bash shell in the directory structure is /bin/sh.
FACTS
MYTHS
sort -r is used to sort a data in reverse order.
FACTS
MYTHS
If you cannot remember the Ubuntu username, you can display a list of all users for the system. To do this, restart the machine, press "Shift" at the GRUB loader screen, select "Rescue Mode" and press "Enter." At the root prompt, type "cut –d: -f1 /etc/passwd" and then press "Enter." Ubuntu displays a list of all usernames assigned to the system. After finding the correct username, you can use the "passwd" command to assign a new password for the user.
FACTS
MYTHS
Access control list (ACL) provides an additional, more flexible permission mechanism for file systems.
FACTS
MYTHS
-i of grep will accept both (upper and lower) case.
FACTS
MYTHS
Basically, ACLs are used to make a flexible permission mechanism in Linux
FACTS
MYTHS
setfacl is used to set the ACLs of a file or directory
FACTS
MYTHS
grep will scan the document for the desired information and present the result in a format you want. 114. To add permission for user setfacl -m "u:user:permissions" /path/to/file.
FACTS
MYTHS
Bash or Bourne Again Shell is not the identical similar shell to Bourne or .sh in Unix.
FACTS
MYTHS
-v of grep displays only the count of matching lines.
FACTS
MYTHS
Sort can use powerful commands which can perforcomplex tasks in a jiffy.
FACTS
MYTHS
Korn Shell or KSH was developed by a person named Davi Korn, which attempts to integrate the features of other shells like C shell, Bourne Shell, etc.
FACTS
MYTHS
The default ACL is a specific type of permission assigned to a file.
FACTS
MYTHS
Default ACLs can only be applied to files.
FACTS
MYTHS
If you want to remove the set ACL permissions, use setfacl command with -r option.
FACTS
MYTHS
Assigned a 777 permission for his file name "Linux.txt" to restrict the group account in editing the file.
FACTS
MYTHS
