Handy Terminal Keyboard Shortcuts

Take these short-cuts handy to increase your productivity.

Cursor Movement Control
Ctrl-a: Move cursor to the start of a line
Ctrl-e: Move cursor to the end of a line
Ctrl-Left/Right: Navigate word by word (may not work in all terminals)

Modify Text
Ctrl-w: Delete the whole word to the left of the cursor
Ctrl-k: Erase to end of line
Ctrl-u: Erase to beginning of line

Scrolling/Buffer Control
Shift-PageUp/PageDown: Scroll through current buffer
Ctrl-s: Pause terminal output (program will keep running)
Ctrl-q: Release terminal output (after being paused)
Ctrl-l: Clears the screen. Use this instead of the clear command.

History
Ctrl-r: Search the history (enter to run the command once found)

Bonus Tip: Use ‘!!’ command to run last command and ‘!com’ to run the last command starting with ‘com’.

Process Control
Ctrl-d: Exit
Ctrl-c: Kill the current process
Ctrl-z: Put the current process in the background (fg will restore it)

if any other Short cut key comes to my mind, It will be posted on Social media @facebook @twitter.

Source: thelinuxdaily

Advertisements

Communicate with other users in your terminal using “write” command

If you are only user on a system this tutorial is not meant for you. However, you can learn from it. This tutorial is meant for the system admin who might need users information and need to communicate with users. System admin can actually do so using the Terminal with “write” utility.

who: list users on system

This utility simply list the users who is using the system. Remember, all the users who is using the system must be connected to a network with logged in date and time.

who

w: list users on system(Detail information)

This utility also list the logged in users with the the additional information on how long the user has been idle, how much computer processor time each user has used during login session and the commands each user are running.

There’s a similar utility like “w” called “finger.” You need to install finger utility in your system. It is available in repository of all Linux systems.

w

Write: send messages to logged in user of same system

This is the utility that we are waiting for. Write sends a message to another logged in user. The syntax is:

write username [terminal]

The username is the username you want to communicate with. The terminal is optional which is the device name. You can display the user names and device names of logged in users by using who, w or finger commands.

To establish the two way communications both the user should execute write command. To quit messaging hit “Ctrl+D”.

By default, accepting messages are turned off for security reasons. You must allow other users to send you message. Use the following command:

mesg y

You can block messages using following command:

mesg n

 

Download Youtube Videos from Terminal in Fedora Linux

Shocked!! Yeah guys we can download not only videos from YOUTUBE but also from DAILYMOTION, METACAFE and many more using Terminal in Fedora. Just follow the steps given below :

We will use the tool called “Youtube-dl” which will help us download the video. Youtube-dl is a python script which also supports video downloading from metacafe, dailymotion etc. This tool sure can download videos from youtube but from other video sharing websites try it yourself.

First, let’s install the youtube-dl. It is available in default Fedora repository, as a root user or access type:

sudo yum install youtube-dl

After successfully installing youtube-dl, the syntax to download the video is:

youtube-dl youtube_link

I am going to download Fast and Furious 6 official trailor. I will just copy the link, open the terminal and type:

youtube-dl http://www.youtube.com/watch?v=dKi5XoeTN0k

Some shells might have problem and won’t work without the code so add the quotes or restart your PC.

youtube-dl "youtube_link"

The video will be successfully downloaded in my HOME directory. You can download as many videos as you want at the same time using terminal tabs or multiple terminals.

Screenshot from 2013-05-13 13:13:37

 

How to install and uninstall applications in Fedora[Terminal and Graphical]

This tutorial will show you how to install and uninstall applications in Fedora using PackageKit(Graphical) and yum(Terminal). I am using the Fedora 18. If you are the Ubuntu user, see managing software’s in Ubuntu via Terminal. If you have just switched from Windows environment to Linux, first do the installing using the Graphical interface. It’s way simple and easy. Whereas, application installing and uninstalling is much more faster via Terminal. You just have to be little bit familiar with the command language and Linux commands. Try both and implement which  one u feel comfortable and easier.

1. Graphical[PackageKit]:

There is a default software managing application in Fedora called ‘PackageKit’ which graphically assist the user on installing and uninstalling the applications. All the application available in Fedora repositories are available in PackageKit.

Installing software using PackageKit:

First of all, open “Software” programs from System Tools. Now, in the search box type the name of the application you wish to install and hit enter or click the ‘Find’ button. I am going to install nano which is a simple text editor.

installing nano in fedora

Select the software by clicking it and click Apply on the right hand bottom. After that, give the authentication by typing in your password and your software is installed.

Uninstalling software using PackageKit:

Open Add/remove program. In the search box type the name of the program that you wish to remove and click find or hit enter. If the box is ticked then the program is installed. Then click apply which will remove the software. I am going to remove the Nano which I have just installed.

uninstalling software using PackageKitNow, the nano is successfully removed.

2. Install Application using terminal Command-line[Yum]:

You need the root access while installing and uninstalling the applications. To switch to the root user for the normal user type ‘su’, hit enter and type the password. Now, you are login as a root user. Also, you can give the root permission staying in the normal user as well by typing ‘su -c’.

Installing software from terminal:

The syntax to install software is:

yum install software_name

To install the software called nano, I would type:

yum install nano

OR if you haven’t changed yourself into the root user, give root access permission as:

su -c 'yum install software_name'

To install the software called putty, I would type:

su -c 'yum install nano'install

Uninstalling software from terminal:

The syntax for uninstalling software is:

yum remove software_name

To remove the software called ‘nano’ which I have just installed I would type:

yum remove nano

OR if you haven’t changed yourself into the root user, give root access permission as:

su -c 'yum remove software_name'

To uninstall the software called putty, I would type:

su -c 'yum remove nano'

remove

 3. Installing .rpm using PackageKit:

When you download the software for the Linux, they will let you choose your distro or the package. Fedora uses .rpm package, so while downloading software for Fedora always choose the .rpm package. I am going to install Skype in my Fedora. While I download I will see this:

skype for fedoraAs you can see, that rpm is going to be opened by PackageKit. After the download is complete, you will be notified as will ask you if you want to install or not:

installSkype notifierClick on Install and done! The Skype is installed in my system.