(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
Gnome terminal basics
1. GNOME Terminal Basics
GNOME Terminal is a terminal emulator for the
GNOME desktop environment written by Havoc
Pennington and others.
Terminal emulators allow users to access a UNIX
shell while remaining on their graphical desktop.
2. GNOME Terminal Basics
To Open Terminal:
→ Search for Terminal on Dash.
Or,
→ Press Ctrl + Alt + T
3. GNOME Terminal Basics
About display prompt:
khassan@Ubuntu:~$
user@computer:~$
~ Represents Home directory.
$ Represents the user.
5. GNOME Terminal Basics
List all files and folders in current directory:
:~$ ls [ Lists color coded files and folder names.
Blue names are directories, Light blue
names are protected directories, White
names are files and Green names are
executable files.]
7. GNOME Terminal Basics
Clear:
To clear screen:
$ clear
[ This command clears the screen but you can still find
previous commands by pressing uparrow key. ]
8. GNOME Terminal Basics
Change directory:
$ cd / [goes to the root directory.]
$ cd [goes to home directory from anywhere.]
$ cd Desktop/
~/Desktop$ pwd
[ /home/username/Desktop ]
$ cd ../ [ Up one directory]
9. GNOME Terminal Basics
Make Directory:
~/Desktop$ mkdir “Test Directory”
Or,
~/Desktop$ mkdir -m 777 “Test Directory”
[ -m option represents mode like chmod.
The directory name has a space and so the
quotation mark. ]
11. GNOME Terminal Basics
To Create a File:
$ touch filename
[ file will not be created if the file already exists. ]
$ >filename
[ fill will be created and replace previous one. ]
$ >>filename
[ as touch ]
12. GNOME Terminal Basics
Editing a file using any editor:
$ gedit filename.txt
[ gedit is the notepad like editor in Ubuntu. ]
$ nano filename.txt
$ vim filename.txt
13. GNOME Terminal Basics
CAT ( Short for concatenate. )
Display contents of one or multiple files.
$ cat test.txt test2.txt
There are lots of other uses of cat command.
Read: http://www.tecmint.com/13-basic-cat-command-examples-in-linux/
14. GNOME Terminal Basics
:~$ su
Substitutes user or switches user to root.
In Ubuntu root user is disabled by default. It has no password.
:~$ sudo touch textfile.txt
Gives root privileges for a single command. Here that single command is
touch.
:~$ sudo -i
Switches user to root using normal users password. Exit will change the
prompt to normal user.
15. GNOME Terminal Basics
File Permission 01
File permission symbols:
u = user (owner)
g = group (group)
o = other (other)
- = not / normal files
d = directory
l = link
r = read = 4
w = write = 2
x = execute = 1
4 + 2 + 1 = 7
16. GNOME Terminal Basics
File Permission 02
To see the file permission details use ls -l. This option is for long
list of file permission.
khasan@KHasan:~$ ls -l
total 48
d rwx r-x r-x 3 khasan khasan 4096 Nov 29 07:49 Desktop
d rwx r-x r-x 2 khasan khasan 4096 Nov 21 02:45 Documents
d rwx r-x r-x 3 khasan khasan 4096 Nov 26 18:50 Downloads
- rw- r-- r-- 1 khasan khasan 8980 Nov 21 02:30 examples.desktop
G OU
17. GNOME Terminal Basics
File Permission 03
To change or edit files that are owned by root,
sudo must be used.
Changing file permissions for a particular
user/group/other:
chmod u/g/o+r/w/x filename
Ex:
chmod o-w-x filename
18. GNOME Terminal Basics
File Permission 04
To change file permission for all types of user:
[ To change or edit files that are owned by root, sudo must be used. ]
chmod -R ugo filename
Ex:
chmod -R 777 filename
4 = Read, 2 = Write, 1 = Execute, 0 = none
4+2+1 = 7
19. GNOME Terminal Basics
File Permission 05
Change Ownership:
sudo chown -R username:group directory
will change ownership (both user and group) of all files and
directories inside of directory and directory itself.
sudo chown username:group directory
will only change the permission of the folder directory but will leave
the files and folders inside the directory alone.