Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ubuntu Working in Terminal

Similar presentations


Presentation on theme: "Ubuntu Working in Terminal"— Presentation transcript:

1 Ubuntu Working in Terminal
Lab 3

2 Opening Terminal By default terminal is available in GUI mode in Ubuntu To open terminal easiest way is to 'search' function on the dash. Dash -> Search for Terminal Command ctrl+alt+t

3 Ubuntu File and Directories
Creating Files/Directories Moving Files/Directories Copying Editing text files

4 Creating folders Command to create a directory: i.e mkdir mnt
mkdir /Path where the directory is to be created i.e mkdir mnt

5 Verify the newly created folder
Command ls It will list down all files and folders from the given path Refining ls command Ls –la(It will show details)

6 Creating New File Command is touch To verify we can use
touch /path where to be created.file extention i.e touch mnt/test.txt To verify we can use ls command

7 Deleting files Command to delete rm /Path of the file to be deleted
i.e rm mnt/test.txt

8 Deleting folders and their sub-folders
rm -rf /Path of the directory to be deleted options '-r' which means recursive and '-f' means force

9 Backing up /Copying your files
cp /source path/file name /Destination path /file name. i.e cp /mnt/test.txt /opt/test1.txt

10 Backing up / Copying your Directories
cp -r /directory/to/be/copied/ /where/to/copy/to/ i.e cp /mnt/test.txt /opt/test1.txt

11 Moving Directories i.e mv /mnt/test /opt Command to move mv
Command format mv /source /destination i.e mv /mnt/test /opt

12 Moving Files i.e mv /mnt/test.txt /opt Command to move mv
Command format mv /source Directory/file name.ext /destination i.e mv /mnt/test.txt /opt

13 Saving or editing in a file
Go to the file path Cd /folder name/ Now Vi test Press insert Enter text “Hello World” To save changes in file Press escape, then type “:wq!”

14 Class Work Create a directory using terminal in mnt folder with Directory name BSCS Create a file with your own name in BSCS folder Add text “Welcome to SZABIST” in the same file Copy this file to OPT folder with the name BSCS-Copy

15 Command prompt The command prompt indicates that the system is ready to accept commands. Examples include: dir]$ dir$ $ #

16 Command prompt The dollar sign ($) usually means you are logged in as a regular user. The hash sign (#) usually means you are logged in as root.

17 Some useful commands passwd: Change your password.
date, cal: Find out today's date and display a calendar. who: Find out who else is active on the system. clear: Clear the screen.

18 Changing password The passwd command allows you to change your password Command Passwd (username) i.e passwd root This will change the password of your root account.

19 The date command The date command shows the current date and time.
Date (enter) Possible Output (Current date of the system)

20 The cal command The cal command is used to view calendar
Syntax of the command Cal [Moth] [Year] Example: cal

21 The clear command The clear command clears your screen.
Syntax of the Command clear (Enter)

22 The ls command The ls command lists available file and directories.
Syntax of the Command ls (Enter) Some other extensions ls /dev This command will list down all hardware devices available on the system.

23 Thank you 


Download ppt "Ubuntu Working in Terminal"

Similar presentations


Ads by Google