Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Kernel At a high level, the kernel in an operating system serves as the bridge between applications and the actual data processing of the hardware.

Similar presentations


Presentation on theme: "The Kernel At a high level, the kernel in an operating system serves as the bridge between applications and the actual data processing of the hardware."— Presentation transcript:

1

2 The Kernel At a high level, the kernel in an operating system serves as the bridge between applications and the actual data processing of the hardware the OS is running on. The kernel manages system resources and abstracts resources that applications must access.

3 Basic Kernel Representation

4 What is the Linux Shell? Computers understand the language of zeros and ones known as binary language. In the early days of computing, instructions were provided using binary language, which is difficult for all of us humans to read and write. Therefore, in an operating system there is a special program called the shell. The shell accepts human readable commands and translates them into something the kernel can read and process.

5 The shell is a user program. Most common shell in Linux. BASH ( Bourne-Again SHell ) CSH (C SHell)Bill JoyUniversity of California (For BSD)The C shell's syntax and usage are very similar tothe C programming language. KSH (Korn SHell) David Korn AT & T Bell Labs --TCSHSee the man page. To find all of the available shells in your system, type the following command: $ cat /etc/shells

6 The following picture shows simplified version of information and command flow when one user interacts with the computer running Linux.

7 In Linux (and Unix in general), there is a superuser named root. The Windows equivalent of root is Administrators group. The superuser can do anything and everything, By default, the root account password is locked in Ubuntu. This means that you cannot login as root directly or use the su command to become the root user. However, since the root account physically exists it is still possible to run programs with root-level privileges.

8 This is where sudo comes in - it allows authorized users (normally "Administrative" users; for further information please refer to AddUsersHowto) to run certain programs as root without having to know the root password.

9 sudo: Executing Commands with Privileges Most of the following commands will need to be prefaced with the sudo command if you will be working with directories or files not owned by your account. Please see RootSudofor information on using sudo.

10 All of Unix is case sensitive. WARNING!

11 Many Linux commands you type at a shell prompt are not that different from the commands you would type either in MS-DOS or in Windows (from the MS-DOS prompt). In fact, some commands are identical. DOS to Linux Cheat Sheet

12 File & Directory Commands pwd: The pwd command will allow you to know in which directory you're located ( pwd stands for "print working directory"). Example: "pwd" in the Desktop directory will show "~/Desktop".

13 File & Directory Commands ls: The ls command will show you the files in your current directory. Used with certain options, you can see sizes of files, when files where made, and permissions of files. Example: "ls ~" will show you the files that are in your home directory.

14 File & Directory Commands cd: The cd command will allow you to change directories. When you open a terminal you will be in your home directory. To move around the file system you will use cd. Examples: To navigate into the root directory, use "cd /" To navigate to your home directory, use "cd" or "cd ~" To navigate up one directory level, use "cd.." To navigate to the previous directory (or back), use "cd - "

15 File & Directory Commands To navigate through multiple levels of directory at once, specify the full directory path that you want to go to. For example, use, "cd /var/www" to go directly to the /www subdirectory of /var/.

16 File & Directory Commands cp: The cp command will make a copy of a file for you. Example: "cp file foo" will make a exact copy of "file" and name it "foo", but the file "file" will still be there. When you use mv that file would no longer exist, but when you use cp the original file stays and a new copy is made.

17 File & Directory Commands mv: The mv command will move a file to a different location or will rename a file. Examples are as follows: "mv file foo" will rename the file "file" to "foo". "mv foo ~/Desktop" will move the file "foo" to your Desktop directory but will not rename it. You must specify a new file name to rename a file.

18 rm: Use this command to remove or delete a file in your directory. It will not work on directories which have files in them (use rmdir instead).

19 mkdir: The mkdir command will allow you to create directories. Example: "mkdir music" will create a music directory.

20 man: The man command is used to show you the manual of other commands. Try "man man" to get the man page for man itself. See the " Man & Getting Help" section down the page for more information. Move up and down the man file with the arrow keys, and quit back to the command prompt with "q". "man man" will bring up the manual entry for the man command, which is a good place to start!

21 File & Directory Commands System Information Commands df: The df command displays filesystem disk space usage for all partitions. " df -h" is probably the most useful - it uses megabytes (M) and gigabytes (G) instead of blocks to report. ( -h means "human-readable") du: free: The free command displays the amount of free and used memory in the system. "free -m" will give the information using megabytes, which is probably most useful for current computers.

22 top: The top command displays information on your Linux system, running processes and system resources, including CPU, RAM & swap usage and total number of tasks being run. To exit top, press "q". uname -a: The uname command with the -a option prints all system information, including machine name, kernel name & version, and a few other details. Most useful for checking which kernel you're using. lsb_release -a: The lsb_release command with the -a option prints version information for the Linux release you're running, for example: user@computer:~$ lsb_release -a

23 Cal: Display Calender cat Display the contents of a file clear Clear terminal screen Ping: check connectivity Netstate: show open ports ifconfig reports on your system's network interfaces. apt-get Search for and install software packages (Debian)

24 Adding A New User "adduser newuser" command will create a new general user called "newuser" on your system, and to assign a password for the newuser account use "passwd newuser". Id: check user ID Addgroup: add group

25 File & Directory Commands ls lists directory contents cdchanges from the current working directory to another mkdirmake a directory rmdirremove a directory rmremoves a file, but has a recursive option that can be used to remove non empty directories cpcopies a file mvmoves its argument to a new name morelists its argument a page at a time catconcatenates its argument and sends to standard output tararchives its argument (with compression if specified) mandisplays the manual pages of its argument su switch to another user chmodchanges file/directory permission chownchanges file/directory owner chgrpchanges file/directory group


Download ppt "The Kernel At a high level, the kernel in an operating system serves as the bridge between applications and the actual data processing of the hardware."

Similar presentations


Ads by Google