Linux Adminstartion
What is OS?
● An operating system (OS) is a collection of
software(Programs) that manages computer
hardware resources .
● It is an interface between a computer user and
computer hardware.
What is Linux?
● Linux is a Kernel.(core part of linux based OS)
- It is open source.
- its source code is freely available.
- It is free to use.
History of Linux
Unix - Ken Thompson and Dennis Ritchie
GNU project - Richard Stallman – FSF - GNU General Public License(GPL)
Linux - Linus Torvalds
Architecture of a Linux system
Linux Distributions(Disto's)
Linux
RedHat
Debian
Kali Linux,Linux Mint,Ubuntu,
Ubuntu MATE
CentOS,Fedora,Mandriva Linux
,openSUSE,
Red Hat Linux,Scientific Linux
CentOS
Community Enterprise Operating System
Linux Administration
Linux System Administration Linux Server Administration
BASIC LINUX COMMANDS
Terminal and command
● We manage linux using commands.
command [options] [arguments]
● Use an application called terminal to pass commands
to the operating system.
Application--->System Tools--->Terminal.
Basic Commands
1. # uptime
- The uptime command prints the current time
- The duration of time the system has been up
- The number of users online.
- The load average.
[ Linux keeps uptime information in /proc/uptime]
2. # date
- Display date & time.
3. # cal
- Display a calendar.
# cal 12 07 1994
4. # clear
- Clear terminal screen
Basic Commands
5. # echo
- This command will echo whatever you provide it.
6. # whatis [command name]
- This command gives a one line description about the
command.
7. # man [command name]
- To see a command's manual page.
8. # info [command name]
- These are like web pages. Internal links are present
within the info pages.
Basic Commands
6. # whoami
- This command reveals the user who is currently logged in.
7. # cd [path-to-directory]
- Change the current working directory to the directory
provided as argument.
8. # pwd (Print Current working directory)
- The current directory can be checked with ‘pwd’ command
Basic Commands
● Fields of # ls -l or # ll command.
drwxr-xr-x 2 root root 4096 2016-07-06 12:52 files
type
Accesmode
/permission
No:of links/
Shortcuts
owner
group
size Modification date and time
Name
U G O
Basic Commands
1. # ls -la - To list hidden files.
2. # ls -ld - To list the properties of a director.
3. # ls -lh - The size is converted into kilo/Mega
bytes.
4. # ls -lr - List in reverse of alphabetical order.
5. # ls -lS - To sort in term of size.
6. # ls -lSr -List in reverse form of size.
7. # ls -lt – List based on time.
Basic Commands
10. # touch [filename].[extension]
- For creating an empty file.
- If a file already exists, touch will update its
time stamp.
11. # nano [filename]
- To write and modify the content of a file.
12. # cat [filename]
- used to concatenate one or more files and print the result to the
standard output
- Cannot modify the content.
13. # vim [filename]
14. # vi [filename]
Basic Commands
15. # mkdir [directory name]
- to create a directory.
# mkdir -p – to create parent directory
16. # rm
- To remove a file or directory
# rm -f [filename] – forcefully remove
# rm -rf [file or directory name]
Basic Commands
17. # cp [source path] [destination path]
# cp -r – to copy directory.
18. # mv [source path] [destination path]
19. # head [filename]
# head -n5 [filename] -to print the first 5 lines
20. # tail [filename]
# tail -n5 [filename] -to print the last 5 lines
Basic Commands
21. # wc [filename] -word count
# wc -l [filename] – Total lines.
# wc -w [filename] – Total words.
# wc -c [filename] – Total characters.
22. # cd -Change working direstory.
# cd . - working directory itself.
# cd .. - Parent directory
# cd ../..
23. # rmdir – to remove empty directory.
24. # history – To view the history of commands.
25. # halt – To terminate the system.

Basic

  • 1.
  • 2.
    What is OS? ●An operating system (OS) is a collection of software(Programs) that manages computer hardware resources . ● It is an interface between a computer user and computer hardware.
  • 3.
    What is Linux? ●Linux is a Kernel.(core part of linux based OS) - It is open source. - its source code is freely available. - It is free to use.
  • 4.
    History of Linux Unix- Ken Thompson and Dennis Ritchie GNU project - Richard Stallman – FSF - GNU General Public License(GPL) Linux - Linus Torvalds
  • 5.
    Architecture of aLinux system
  • 6.
    Linux Distributions(Disto's) Linux RedHat Debian Kali Linux,LinuxMint,Ubuntu, Ubuntu MATE CentOS,Fedora,Mandriva Linux ,openSUSE, Red Hat Linux,Scientific Linux
  • 7.
  • 8.
    Linux Administration Linux SystemAdministration Linux Server Administration
  • 9.
  • 10.
    Terminal and command ●We manage linux using commands. command [options] [arguments] ● Use an application called terminal to pass commands to the operating system. Application--->System Tools--->Terminal.
  • 11.
    Basic Commands 1. #uptime - The uptime command prints the current time - The duration of time the system has been up - The number of users online. - The load average. [ Linux keeps uptime information in /proc/uptime] 2. # date - Display date & time. 3. # cal - Display a calendar. # cal 12 07 1994 4. # clear - Clear terminal screen
  • 12.
    Basic Commands 5. #echo - This command will echo whatever you provide it. 6. # whatis [command name] - This command gives a one line description about the command. 7. # man [command name] - To see a command's manual page. 8. # info [command name] - These are like web pages. Internal links are present within the info pages.
  • 13.
    Basic Commands 6. #whoami - This command reveals the user who is currently logged in. 7. # cd [path-to-directory] - Change the current working directory to the directory provided as argument. 8. # pwd (Print Current working directory) - The current directory can be checked with ‘pwd’ command
  • 14.
    Basic Commands ● Fieldsof # ls -l or # ll command. drwxr-xr-x 2 root root 4096 2016-07-06 12:52 files type Accesmode /permission No:of links/ Shortcuts owner group size Modification date and time Name U G O
  • 15.
    Basic Commands 1. #ls -la - To list hidden files. 2. # ls -ld - To list the properties of a director. 3. # ls -lh - The size is converted into kilo/Mega bytes. 4. # ls -lr - List in reverse of alphabetical order. 5. # ls -lS - To sort in term of size. 6. # ls -lSr -List in reverse form of size. 7. # ls -lt – List based on time.
  • 16.
    Basic Commands 10. #touch [filename].[extension] - For creating an empty file. - If a file already exists, touch will update its time stamp. 11. # nano [filename] - To write and modify the content of a file. 12. # cat [filename] - used to concatenate one or more files and print the result to the standard output - Cannot modify the content. 13. # vim [filename] 14. # vi [filename]
  • 17.
    Basic Commands 15. #mkdir [directory name] - to create a directory. # mkdir -p – to create parent directory 16. # rm - To remove a file or directory # rm -f [filename] – forcefully remove # rm -rf [file or directory name]
  • 18.
    Basic Commands 17. #cp [source path] [destination path] # cp -r – to copy directory. 18. # mv [source path] [destination path] 19. # head [filename] # head -n5 [filename] -to print the first 5 lines 20. # tail [filename] # tail -n5 [filename] -to print the last 5 lines
  • 19.
    Basic Commands 21. #wc [filename] -word count # wc -l [filename] – Total lines. # wc -w [filename] – Total words. # wc -c [filename] – Total characters. 22. # cd -Change working direstory. # cd . - working directory itself. # cd .. - Parent directory # cd ../.. 23. # rmdir – to remove empty directory. 24. # history – To view the history of commands. 25. # halt – To terminate the system.