Operating System Practice : Meeting 2-basic commands linux operating system-slide
1. https://github.com/syaifulahdan/ospractice|Operating System Practice |1 to 39
OPERATING SYSTEMS PRACTICE
Basic Commands Linux Operating System
Practice : 1
Instruction Format on Linux Operating System
Basic Commands on Linux Operating System
https://github.com/syaifulahdan/ospractice|
2. https://github.com/syaifulahdan/ospractice|Operating System Practice |2 to 39
A. Objectives
1. Use basic commands for user information
2. Getting to know the format of the instructions on the Linux OS
3. Using basic instructions on Linux OS
4. Learn basic utilities on Linux OS
4. https://github.com/syaifulahdan/ospractice|Operating System Practice |4 to 39
Every LINUX user must have a login name (user
account) that must be registered to the system
administrator.
The login name is limited to a maximum of 8
characters and is generally in lower case
Prompt of bash shell on Linux using the sign "$".
A Linux session consists of:
Login
Working with Shell / running applications
Logout
5. https://github.com/syaifulahdan/ospractice|Operating System Practice |5 to 39
Linux Instruction Format
• $ Instruction Name [option] [argument]
• option begins with the sign – (minus).
• Arguments can be empty, one or more
arguments (parameters).
• Example:
$ ls : No arguments
6. https://github.com/syaifulahdan/ospractice|Operating System Practice |6 to 39
•
•
•
•
•
•
•
•
•
$ ls : No arguments
$ ls a : The option is –a = all, no arguments
$ ls /bin : no option , argument is /bin
$ ls /bin/etc/usr : no option , argument is /bin/etc/user
$ ls l /usr1 : 1 option and 1 argument
L = long list
$ ls l a
/bin/etc
: 2 option and 2 argument
L = long list, a (all user)
https://github.com/syaifulahdan/ospractice|
7. https://github.com/syaifulahdan/ospractice|Operating System Practice |7 to 39
Manual
Linux provides manual on-line.
Some keyboard keys are important in the use
of the manual is
7
Q : To exit the man program
<Enter> : Down, line by line
<Spasi> : Down, per page
b : Back to the top, 1 page
/ : search text (string)
n : Continuing the previous string search
8. https://github.com/syaifulahdan/ospractice|Operating System Practice |8 to 39
Manual is divided into several Section
1 : User commands
2 : System calls
3 : Library calls
4 : Devices
5 : File formats
6 : Games
7 : Miscellaneous
8 : System commands
19 : Kernel internals
N : Tcl/Tk command
11. https://github.com/syaifulahdan/ospractice|Operating System Practice |11 to 39
4. To exit the system use the command logout
or exit
5. Use the command for user information:
6. Use basic commands :
March 3, 2010
date, cal, man, clear, apropos, whatis
id, hostname, uname, w, who, whoami,
chfn, finger
24. https://github.com/syaifulahdan/ospractice|Operating System Practice |24 to 39
Displays a complete file or directory that
consists of the file name, size, modified
date, owner, group and mode or its
attributes.
Displays all files and directory contents.
This argument will cause the process to
run longer, if the process will be stopped
can use ^ c
$ ls -R /usr
$ ls -l /etc
25. https://github.com/syaifulahdan/ospractice|Operating System Practice |25 to 39
Experiment 10 : View the file type
Experiment 11 : Copying files
Copying a file. Give the -i option for
interactive questions when the file already
exists.
25
$ file
$ file *
$ file /bin/ls
$ cp -i [sourcefile] [filecopy]
29. https://github.com/syaifulahdan/ospractice|Operating System Practice |29 to 39
Experiment 13 : Rename the file
Using mv instruction
Displays Moving files to another directory.
per one full screen. If the last argument is
the name of the directory, the files will be
moved to that directory.
29
$ mv f1 prog.txt
$ ls
30. https://github.com/syaifulahdan/ospractice|Operating System Practice |30 to 39
Displays Moving files to another directory. per
one full screen. If the last argument is the
name of the directory, the files will be moved
to that directory.
30
$ mkdir mydir
$ mv f1 f2 f3 mydir
34. https://github.com/syaifulahdan/ospractice|Operating System Practice |34 to 39
Exercise : Practice 1
1 Change the finger information on your computer.
2 Look at the active users on your computer.
3 What commands are used to view a full year's calendar.
4 How can you see the manual of the cal command.
5 How to view ls manual commands with sort keywords.
6 What is the display for the ls a l and ls al commands.
7 Show all files including hidden files in the /etc directory.
35. https://github.com/syaifulahdan/ospractice|Operating System Practice |35 to 39
8 Show all complete files in the /etc directory.
9
Make directory exercise1 in active directory, then copy /etc/group
file to tes1, tes2 and tes3 file in this directory.
10 Display the contents of the test1 file per one full screen.
11 Move the test1 and tes2 files to the home directory.
12 Delete tes1 and tes2 files with confirmation.