| Ctrl + A | যে কমান্ডটি টাইপ করা হচ্ছে কার্সর সেটির শুরুতে চলে যাবে | |
| Ctrl + E | যে কমান্ডটি টাইপ করা হচ্ছে কার্সর সেটির শেষে চলে যাবে | |
| Ctrl + L | স্ক্রীন ক্লিয়ার হয়ে যাবে, clear কমান্ডটির কাজ করবে | |
| Ctrl + U | কার্সরের আগের অংশটুকু মুছে দিবে, কার্সর যদি শেষপ্রান্তে থাকে তবে সম্পূর্ণ লাইনটি মুছে যাবে | |
| Ctrl + H | backspace এর মত কাজ করবে | |
| Ctrl + R | Let's you search through previously used commands | |
| Ctrl + C | যে কমান্ডটি চলছিল সেটি বন্ধ হয়ে যাবে | |
| Ctrl + D | টারমিনাল বন্ধ হয়ে যাবে ; exit কামন্ডের মত কাজ করবে | |
| Ctrl + W | কার্সরের আগের শব্দটি মুছে দিবে | |
| Ctrl + K | কার্সরের পরের অংশটুকু মুছে যাবে | |
| Esc + T | শেষ দুটি শব্দ সোয়াপ করবে | |
| Tab | সম্ভাব্য অ্যাড্রেস পুর্ন করবে (cd /h <ট্যাব চাপুন> -> cd /home/) |
- - Please Notice - -
Content
Showing posts with label Inside the Terminal. Show all posts
Showing posts with label Inside the Terminal. Show all posts
উবুন্টু টারমিনাল এর সর্টকাট key
There are a lot of shortcut key available when you are in the terminal, here are some mostly used-
Working with permission
The most important thing about using the terminal is file permission. Often people face trouble when creating a file as sudo and unable to modify as normal user. In ubuntu every file is owned by a particular person or persons. Only he can change the permission for others. He can also set permission for himself.
Execute:
One of the important permission is the execute permission. This sets a particular elemt as a program whether all files without the execute permission is just another data file. For a folder a execute permission in real terms - allows access to the folder elements.
Read:
The read permission sets who can view the file or folder.
Write:
The write permission sets who can control change and even create files or foders.
It isn’t entirely true to say that users won’t be able to view the listing of a folder unless the execute permission is set. If the read permission for a folder is set, but not the execute permission, users will be able to view a short file listing using the ls command but the long listing command option (i.e. ls ‐l myfolder) won’t work. Why this happens is to do
with the way Linux works on a technical level
with the way Linux works on a technical level
To set up a permission one of the following is usually introduce:
Read only: Set the read and execute permission
Write : Set the read write and execute permission
Deny Access: Unset all read write and execute permission.
How permissions look like:
Within a command-line file listing, permissions are indicated by r, for
read, w, for write, and x, for execute. For all files and folders, the
permissions are listed in a line: owner first, followed by group, and then
others
read, w, for write, and x, for execute. For all files and folders, the
permissions are listed in a line: owner first, followed by group, and then
others
ls –l ~
Here’s what I see on my test system:
total 28
drwxr‐xr‐x 2 shabab shabab 4096 2008‐10‐24 10:07 Desktop
drwxr‐xr‐x 2 shabab shabab 4096 2008‐10‐24 10:07 Documents
Let’s take a closer look at the first in the list—the Desktop folder. The
permissions, ownership and group assignment are listed at the
beginning of the line and read as follows:
drwxr‐xr‐x 2 shabab shabab
The d at the beginning simply indicates this is a directory—another
word for a folder. If a hyphen appears there instead then we’re dealing
permissions, ownership and group assignment are listed at the
beginning of the line and read as follows:
drwxr‐xr‐x 2 shabab shabab
The d at the beginning simply indicates this is a directory—another
word for a folder. If a hyphen appears there instead then we’re dealing
Following this are the three sets of permissions, listed one after the
other: rwxr-xr-x which really indicates that -
other: rwxr-xr-x which really indicates that -
Here are the permissions separated out into sets of three relating to
Owner: rwx
Group: r‐x
Others: r‐x
Changing ownership:
Group: r‐x
Others: r‐x
Changing ownership:
The chown command is used to change the ownership. The following command shall change the owner of report.doc to arif
sudo chown arif report.doc
Changing the Permissions:
The chmod command is used to alter permissions. The easiest way to alter the permission is by specifying which file, for whom and what fields of permission. The following example shall explain:
chmod g+w report.doc
In other words, this adds (+) write permissions (w) for report.doc’s
group (g).
If we were feeling generous and wanted to let other users to write to it
too, we could type the following:
chmod o+w report.doc
This adds (+) write (w) permissions for others (o). On the other hand, if we wanted strict secrecy so that only the file’s owner could read or write to the file, and nobody else, we could type the following:
chmod go‐rw report.doc
This removes (‐) read and write permissions (rw) from report.doc for the group and others (go).
More Terminal Commands
See list of files and folders
ls
example: ls ‐l
‐l : show permissions, ownerships etc
‐a : Show all files, including hidden files
To change location
cd
example: cd Documents
Copy file or folder
first specify file (and path if necessary), cp, then specify destination.
cp
example: cp myfile.doc Desktop/
‐r : Copy folders too, including contents (otherwise
folders will be ignored)
Delete file(s) or folder(s)
multiple files/folders can be specified
rm
example: rm –rf myfolder
‐r : Delete folder;
Create a link to a file (shortcut)
first specify the file (including path if necessary), and then the location where the link should be created. A different filename may be specified for the new link.
ln
example: ln –s myfile.doc ~/Desktop/
Unmount attached storage device
umount
example: sudo umount /media/cdrom
ls
example: ls ‐l
‐l : show permissions, ownerships etc
‐a : Show all files, including hidden files
To change location
cd
example: cd Documents
Copy file or folder
first specify file (and path if necessary), cp, then specify destination.
cp
example: cp myfile.doc Desktop/
‐r : Copy folders too, including contents (otherwise
folders will be ignored)
Delete file(s) or folder(s)
multiple files/folders can be specified
rm
example: rm –rf myfolder
‐r : Delete folder;
Create a link to a file (shortcut)
first specify the file (including path if necessary), and then the location where the link should be created. A different filename may be specified for the new link.
ln
example: ln –s myfile.doc ~/Desktop/
Unmount attached storage device
umount
example: sudo umount /media/cdrom
Terminal Commands
As I said earlier, some commands work on their own. Like, 'ls'. It is very handy.
If you are in your home folder and give the command 'ls' it will show you the files and folders in that location-e.g:
/*I am using Bold to present command input and Italic to present display output*/
ls
Desktop Documents Examples Music Pictures Public Templates Videos
most commands take arguments. like cd (change directory) it will jump to the directory followed in the command. e.g:
cd Documents
or
cd location
If you want to go to any folder directly just type full address in the location field. for example if you want to go to "/home/shabab/Pictures/" type
cd /home/shabab/Pictures
or you can also go step by step
cd /
cd home
cd shabab
cd Pictures
The firs '/' goes to the root directory (like C:\ in windows). And you can figure out the other steps. Be careful about one thing that linux terminal is case sensitive. So if you type 'pictures' instead of 'Pictures' it wont work.
bash: cd: pictures: No such file or directory
Many commands also has command options. like adding the option after command will make it work. Like ls shows all files folders in a directory. But if you also want to see the hidden ones add –a, which causes all files to be listed including hidden ones.e.g:
ls -a
. .esd_auth .ICEauthority .recently-used
To see the details of all elements.
ls -l
Command options can also be combined. To see details of hidden files
ls -la
To see a list of available command options add --help. e.g:
ls --help or
cp --help
To run a command from your current location. Write the command after ' ./ ' many experts interpret it as 'right here'. It is a good way to remember. E.g:
./browser
will run a program called browser located in current directory.
To read the manual of any package
man
e.g.
man gcc
shall open the manual of gnu compiler collection
If you are in your home folder and give the command 'ls' it will show you the files and folders in that location-e.g:
/*I am using Bold to present command input and Italic to present display output*/
ls
Desktop Documents Examples Music Pictures Public Templates Videos
most commands take arguments. like cd (change directory) it will jump to the directory followed in the command. e.g:
cd Documents
or
cd location
If you want to go to any folder directly just type full address in the location field. for example if you want to go to "/home/shabab/Pictures/" type
cd /home/shabab/Pictures
or you can also go step by step
cd /
cd home
cd shabab
cd Pictures
The firs '/' goes to the root directory (like C:\ in windows). And you can figure out the other steps. Be careful about one thing that linux terminal is case sensitive. So if you type 'pictures' instead of 'Pictures' it wont work.
bash: cd: pictures: No such file or directory
Many commands also has command options. like adding the option after command will make it work. Like ls shows all files folders in a directory. But if you also want to see the hidden ones add –a, which causes all files to be listed including hidden ones.e.g:
ls -a
. .esd_auth .ICEauthority .recently-used
To see the details of all elements.
ls -l
Command options can also be combined. To see details of hidden files
ls -la
To see a list of available command options add --help. e.g:
ls --help or
cp --help
To run a command from your current location. Write the command after ' ./ ' many experts interpret it as 'right here'. It is a good way to remember. E.g:
./browser
will run a program called browser located in current directory.
To read the manual of any package
man
e.g.
man gcc
shall open the manual of gnu compiler collection
Understanding Terminal
Most convenient way to access the command-line is to use a terminal program(Application->Accessories->Terminal)
When the terminal program appears, you’ll see something like this:
your_name@your_name‐desktop:~$
The first part of the prompt shows your username. After the @ sign is the name of the computer, commonly referred to as the hostname.
After this your current browsing location is displayed followed by a colon. By default you will start from ~ . Where '~' is a shorthand form of your home directory.
i.e: /home/your_name
The $ sign indicates the string or sentence ends here.
There are many commands to work in terminal mode. They also work very logically. Once you learn the basics you'll find it easier to do many tasks in command mode rather than graphical mode.
Some commands work on their own. They dont require any arguments. While the others take arguments to know what to work with. In other words, they need to be told what file(s) or folder(s) to work with.
Once a command is entered, all that’s usually seen is the prompt again.
There’s no confirmation. bash doesn’t say “OK” or “Command
completed!”. bash is the silent type. It’ll only speak if it has to, usually to
tell you of an error.
We will discuss all the basic commands in another topic.
When the terminal program appears, you’ll see something like this:
your_name@your_name‐desktop:~$
The first part of the prompt shows your username. After the @ sign is the name of the computer, commonly referred to as the hostname.
After this your current browsing location is displayed followed by a colon. By default you will start from ~ . Where '~' is a shorthand form of your home directory.
i.e: /home/your_name
The $ sign indicates the string or sentence ends here.
There are many commands to work in terminal mode. They also work very logically. Once you learn the basics you'll find it easier to do many tasks in command mode rather than graphical mode.
Some commands work on their own. They dont require any arguments. While the others take arguments to know what to work with. In other words, they need to be told what file(s) or folder(s) to work with.
Once a command is entered, all that’s usually seen is the prompt again.
There’s no confirmation. bash doesn’t say “OK” or “Command
completed!”. bash is the silent type. It’ll only speak if it has to, usually to
tell you of an error.
We will discuss all the basic commands in another topic.
Subscribe to:
Posts (Atom)