commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for:
Simply sourcing .bashrc does not function correctly when you edit it and change an alias for a function or the other way round with the *same name*.
I therefor use this function. Prior to re-sourcing .bashrc it unsets all aliases and functions.
Create a serial console with "socket (named pipe)" of "/tmp/socket", "from:server, to:virtual machine" in vmware player, etc.. gui. Run the above command after you have booted the guest OS (which should also be configured for serial console).
Changes your group to the default group, has the same effect as sourcing your profile/rc file (in any shell) or logging out and back in again.
You may want to just use the shortcut "." instead of "source"
Any changes to BASH shell made in .bashrc will be active in the current terminal window from the moment you execute this command, ie. aliases, prompt settings etc. No need to restart terminal.
(In BASH 'source' simile to 'eval' lets you generally execute any bunch of commands stacked in a text file).
Configures screen to always display the clock in the last line (has to be configured only once).
After that you not only have got the possibility to detach sessions and run them in background, but also have got a nice clock permanently on your screen.
This is a different version from my original command: Console clock -- Beautiful (http://www.commandlinefu.com/commands/view/7902/console-clock-beautiful )
This one uses Boxes and Figlet.
To install the dependencies on Ubuntu, type in:
sudo apt-get install boxes figlet
To install the dependencies on Debian, type in:
aptitude install boxes figlet
This will show a console clock with Figlet.
This is with the Star Wars font.
Change the -f option to anything else.
Notice: You need Figlet installed for this to work.
To install Figlet on Ubuntu, type in:
sudo apt-get install figlet
To install Figlet on Debian, type in:
aptitude install figlet
This command will automatically clear the old clock time, and show the new clock time.
It will also slightly format it.
This is like ping -a, but it does the opposite. It alerts you if the network is down, not up. Note that the beep will be from the speaker on the server, not from your terminal.
Once a second, this script checks if the Internet is accessible and beeps if it is not. I define the Net as being "UP", if I can ping Google's public DNS server (18.104.22.168), but of course you could pick a different static IP address. I redirect the beep to /dev/console so that I can run this in the background from /etc/rc.local. Of course, doing that requires that the script is run by a UID or GID that has write permissions to /dev/console (usually only root).
Question: I am not sure if the -W1 flag works under BSD. I have only tested this under GNU/Linux using ping from iputils. If anybody knows how portable -W is, please post a comment.
There are different ways to run X, I prefer to run it without xdm/gdm. The problem is you can't lock X because one can press Ctrl+Alt+F1, press Ctrl+Z and kill you X locking process. Of course you can disable Ctrl+Alt* or Ctrl+Alt+Backspace keys, but it's inconvinient if you really need to switch into console.
Use GNU/screen as a terminal emulator for anything serial console related.
screen /dev/ttyS0 9600
Permet de lire une video dans une console, meme sans interface graphique.
Interet limite, mais a connaitre au cas ou.