Here I'll present from basic to more advanced shell commands.
Above anything, run shell.
Tip 1: When you start shell than you can see that background is white and color of letters is black. That isn't pleasent for eyes. So go to the Konsole toolbar: Settings -> Schema and chose some. Than do it again if you don't like it until you find one that fits for you.
Tip 2: Press CTRL+SHIFT+F to view shell in full screen mode
Tip 3: If you have more than one shells (tabs) opened in your console (you can open it at right from where says: "Shell" -on the bottom of Konsole window) you can navigate between them with CTRL + Arrow Left or Right
Tip 4: If you have lot of text written in shell than to scroll, beside pgup and pgdown and slider, you can do it with CTRL+Arrow UP or Arrow Down
We will start with making two new folders. There are two ways to create new folder through shell. It is same as in Microsoft Windows.
MKDIR name-of-directory or
MD name-of-directory

type command for listing directories in your current directory:
dirthan you will get list of all directories in your current (home) directory. Between others these two should be there.

Now create two files in that folder from your linux explorer such as Konqueror, just position yourself to folder and do Right Click -> Create New -> Text file...
Now change directory with command:
cd name-of-directory
and type
dir to make sure everything is there...
To get back to previous folder use command:
..Next command is move, command, or cut/paste operation that you usual do. Syntax is: mv from/what to-where
You can see it clearly on the picture. Command in translation says: move from folder test1 file test1 to folder test2
Next few lines of commands in bellow picture is experimenting with explained commands. The only one new thing is using
dir command in one different way.
Type:
dir test1 test2 if you have those two folders of cource, and command will display all files from both folders.

Next trick is making of symbolic links.
Symbolic link is something like shorcut, but is is link to some file, in some folder on your filesystem.
Using symbolic link has much advantages:
1. User doesn't have to deal with complex names for filenames
2. Programs treat Symbolic links as real program files meaning that you can you can apply symbolic link to any file, shell script, execution file, system file, text file, eaven folders, name it...
it is created by
ln command with parametar -s
Syntax is: ln -s full-path-of-file name-of-link
Translation of command would be: Make symbolic link of file /home/mayatitan/test1/test1 and put it in folder test2 and name symbolic link test1
note that when dir-ing files you can recognize syblic links because they are in this-like form:
#: name-of-file -> where it is linked
and it is usualy colored with specific color

now when we have finished with working with our files we'll delete them.
note: you can't delete folders that contain files
to delete files position yourself to folder (cd) and use:
rm file-name1 file-name2
which means that you can delete two or more files at once
go to another folder and do the same thing
get back to home and delete folders test1 and test2 with command:
rd test1 test2 it is synonim for remove directory

Beyond lesson 3 notes
--------------------------
1: You can use
ls command in replace for
dir. Just type in shell
ls2: If you want to install some rpm file through shell then position yourself to folder where is rpm file and login as su (super user, command :
su) and type in:
#: rpm -i filename.rpm
(without #:) (rpm is command, -i is parametar that tells command to do instalation of filename.rpm file)
So if you have problems installing some rpm file you can do it this way and you will see errors that you should and maybe will fix
3: extracting archive from .tar.gz file is done with this command:
#: tar -xf filename.tar.gz
0 Responses to “Konsole Shell part 1”
Leave a Reply