Skip to main content

Posts

Showing posts with the label terminal

How to make terminal ask for password every time you type sudo command

when you type sudo command for the first time in a terminal it will ask you the sudo password. This password will be remembered by that terminal for 15 minutes by default. If you want terminal to ask for password each time you type sudo command just do as said below. 1. Type at terminal sudo visudo 2. Edit as shown below Change Defaults env_reset to Defaults env_reset,timestamp_timeout=0

Check your unread messages in Gmail, from terminal

Using the following command, you can check your unread messages in gmail, from terminal: $ curl -u username --silent "https://mail.google.com/mail/feed/atom" | perl -ne 'print "\t" if / /; print "$2\n" if / (.*) /;' replace username with your gmail username. This command will promt for your password, enter it and view your unread in your gmail account .

Search Google.com from the Linux command line

You can search Google.com from the Linux command line without using a command line web browser like lynx or Elinks. All u need is the curl and html2text packages installed. Then issue the following command: curl -A Mozilla http://www.google.com/search?q=Dipin+Krishna |html2text -width 60 where you can replace Dipin Krishna with another keyword of your choice. The results will be displayed in your console application with a width of 60. Few other examples: curl -A Mozilla http://www.google.com/search?q=how+to+install+ubuntu |html2text -width 80 curl -A Mozilla http://www.google.com/search?q=install+gtalk+in+ubuntu |html2text -width 100

Keyboard shortcuts that you can use within terminal

You can use keyboard shortcuts and other command line tricks to make entering commands easier and faster. You might already know about the ‘tab’ key which completes partial commands and even file and directory names. Here are some other keyboard shortcuts you can use within terminal: Ctrl-a Move to the start of the line. Ctrl-e Move to the end of the line. Alt-] x Moves the cursor forward to the next occurrence of x. Alt-Ctrl-] x Moves the cursor backwards to the previous occurrence of x. Ctrl-u Delete from the cursor to the beginning of the line. Ctrl-k Delete from the cursor to the end of the line. Ctrl-w Delete from the cursor to the start of the word. Ctrl-y Pastes text from the clipboard. Ctrl-l Clear the screen leaving the current line at the top of the screen. Ctrl-x Ctrl-u Undo the last changes. Ctrl-_ Alt-r Undo all ...

Aptitude: a terminal-based package manager

Aptitude is a terminal-based package manager that can be used instead of apt-get. Aptitude marks packages that are automatically installed and removes them when no packages depend on them. This makes it easy to remove applications completely. To use Aptitude, replace apt-get with aptitude in the command line. Example: sudo aptitude install packagename sudo aptitude remove packagename sudo aptitude update sudo aptitude upgrade For an ncurses-based graphical user interface, type sudo aptitude For more information, see the aptitude documentation

Irssi 0.8.13 released: IRC from console (terminal)

Irssi is a terminal based IRC client for UNIX systems. It also supports SILC and ICB protocols via plugins. Greatest features You might be wondering what makes Irssi such an easy and comfortable client to use: Autologging Irssi will automatically log any channels, queries or special windows that you want. The logfiles will be separated per IRC network, and even log rotation is supported. Log file formats, themes and destination directories can be easily configured with the Irssi log settings. Formats and themes Theming is a popular item in todays desktop enviroments, it's an easy yet powerful way to customize your Irssi client's look and feel. Irssi's formatting is modular which means you can just change the appearance of the objects and all items contaning that object will change into that format. Configurable keybindings This feature is a piece of art; it allows you to modify the default keybindings and create your own so you can customize your client. If these keybinding...

Create launcher for applications operating through the terminal

Here we have created a launcher for applications, operating through the terminal, this may disadvantage those who wish to launch or create links to these applications. To do this follow these three steps: 1. Create a launcher with the terminal of our choice: For example, my favorite is terminal Xterm and I run Moc: The command would look like this: xterm -e mocp Here are a list of terminal emulators for you to use: gnome-terminal -x mocp sakura -e mocp konsole -e mocp xterm +u8 -e mocp 2. Create a script:. Open a new file with our favorite text editor and put the following: #!/bin/bash xterm -e mocp Save the file and then give it execute permissions: # chmod +x filename 3. Create a hotkey for the program: This depends on the program or environment that are using (can be in gnome, kde, Openbox) or any program(for that as xbindkeys) I hope you can use them now.

Assign a Hotkey to Open a Terminal Window in Ubuntu

Since we spend so much time at the command line in Ubuntu, it sometimes makes it simpler to launch a new terminal window with a shortcut key. Ubuntu has a built-in utility for assigning shortcut keys. Go to System \ Preferences \ Keyboard Shortcuts: Scroll down to where it says "Run a terminal", and click in the Shortcut column. When you see "New accelerator…", the next keystroke that you use will set the keyboard shortcut. I assigned Ctrl+Alt+X as mine…. one press of the key combination and up pops a terminal. What a time saver!