Voice of the Masses: What’s your best Linux tip?
|It’s been a while since our last podcast, thanks to deadlines and summer holidays, but we’re gearing up to make another and want to hear from you! What’s your best GNU/Linux or FOSS tip? Maybe it’s a Bash one-liner that saves you time, or perhaps you’ve discovered a free software gem that everyone else should try. Let us know in the comments below, and we’ll read out the best in our upcoming recording.
37 Comments
How about streamripper?
See http://my-linux-tools.blogspot.be/2013/11/record-songs-from-shoutcast-internet.html
I’ll give you two tips:
* Learn to touch-type;
* In Bash, Ctrl-r to search command-line history.
I couldn’t pick one but here are the 3 commands that I depend on most:
$ tail -f – great for keeping an eye on server logs when troubleshooting
$ scp user@host:/dest – all the fun of ” cp ” but to a remote host over ssh.
$ ddrescue – like dd but with helpful output
With Unison you can sync a directory on your client with your server over your ssh-login.
– very fast
– very simple
Unison must be installed on the client and on the server (same version).
There also exists a Gtk GUI-Client for Unison.
You can also download a Windows Version of this tool.
Aimed mainly at non Linux users I think my first tip would be “just give Linux a try and be prepared to try different distros before giving up on it”
Yes it’s probably a bit off the brief but it does promote Linux. As a breed of techies we all have our favourites and long may it remain so 😉
Let other people test new hardware before you fork out money for it.
Think about joining a LUG.
Back up.
Play around with your distro.
Have fun.
Don’t worry about killing your OS, just reinstall and thank your gods it was not Windows.*
*With your PC. Not with the servers at work.
Install Linux using a three-partition method:
* /home
* /
* /opt (large files, data, …)
The reason I am doing it this way is to quickly reinstall or replace the complete OS without losing settings. When time comes to reinstall, I’ll rename my home folder and launch the fresh installation. Ask the installer to only format the root partition. And Voila !
In 20′ flat the OS can be replaced with a different one. From there it’s reinstalling the additional packages & copy settings from the old home folder to the new. Beats reinstalling using one partition anytime !
Agree! Since I don’t work linux, but rather work in linux a separate /home partition, with all essential files and settings, is one of the main reasons – apart from being open source – to use linux. It’s extremely easy to get a quick fix if something goes awfully wrong (which happens from time to time if I start working linux to ‘fix’ things).
Photorec is great for file recovery !
photorec isn’t just for pictures. It also recovers many other types of files. The good thing also is that it doesn’t alter the broken filesystem. It scans it and copies the files it could recover to the local file system. The original file system (i.e. a usb stick) remains in its broken state.
sudo apt-get install testdisk
sudo photorec /d /tmp/recovery /dev/sdb (copy anything that can be recovered from /dev/sdb into /tmp/recovery.)
This is great for watching logs for something you’re not exactly sure where it’s going:
sudo tail -f -n 0 `sudo find /var/log -type f`
Note that if you’ve got a lot of log files (Checkpoint firewalls are pains for that), that line might choke, so you might need to rewrite it to:
sudo tail -f -n 0 `find /var/log -type f -maxdepth 2`
Also, whenever you see a command which says “use dd”, I rewrite that to “use dcfldd” as you can make it tell you it’s progress.
Another tip; use Byobu on your servers. It’ll save you if you get cut off – then F7 (it varies, but usually works on Ubuntu based derivatives) to scroll up.
Oh yehr, another tip – consider going to FLOSS orientated conferences. OggCamp has just been announced 🙂
I have an RPI running byobu and irssi which keeps going even when my main box needs restarting when I’m trying a new distro and I still have access to cleverer people to help me
oh and separate / and /home when you do an install, that way you retain all your files etc 😉
But how big should /home be? I am gonna put mint on a spare 500gb hard drive, I have used it before and done an install but never done a /home partition
I think a simple rule of thumb is to give the / partition about 20-30 GB, and then leave the rest for /home. In your case I might make a 15 or 20 GB / partition and then leave the rest for home.
Ta very much
This did not work for me because I only used a 60 GB drive. Only do this if you will not run out of space.
No matter how much distro hopping or system upgrading you do – always keep a partition with the EXACT same distro AND release version that you’ve set up for your parents so you can see exactly the same screen and options while supporting them over the phone.
Another tip – it’s fairly easy to get a man to at least dual boot when you explain why it’s safer to surf porn on Linux. Just saying.
Virtualbox is your friend. So is RAID, drives are cheap.
Linux is an excellent platform for writing program code. Unfortunately, computer keyboards haven’t kept up with the needs of programmers: many characters we need require typing a shift+ combination (e.g. shift+4 to get $ ), a two-digit maneuver that can interrupt ones flow.
All is not lost! Most editors allow you to map keyboard shortcuts, taking shift out of the equation. Here’s an example from my .vimrc file:
map! ,, =>
map! [[ {
map! ]] }
In order, these give me a fat comma (=>) when I quickly type two commas; a left curly bracket for two left braces; and a right curly bracket for two right braces.
This trick lets me skip the ‘shift’ and has saved me from numerous fat-finger errors.
I have a start up xkbcomp script that swaps my left alt with my left ctrl, esc with caps lock and right alt with right shift.
If you are using Gnome Shell on your desktop (I personally like it – contentious I know), then take the time to have a look at the available extensions for your version of the shell.
There are a lot of very useful, functional extensions, as well a bunch of great ‘eye-candy’ extensions. If the extension has settings, it can be worth playing with them as well, as the default settings may not be to your liking.
I use Fedora and currently have F21 (3.14) & F22 (3.16) machines running. Some of my favourites include:
* Activities Configurator – top panel configuration
* AppKeys – Dash Favourites launcher
* Coverflow Alt-Tab
* Dash to Dock
* Drop Down Terminal
* Gradient Top Bar
* Lock Keys – great for wireless keyboards without LEDs
* Media Player indicator
* system-monitor – (3.16 support coming)
* Native Window placement – in the ‘overview’
* OpenWeather
* Panel World Clock – if you need to work with people in other TZs
* Tracker Search provider
* Transmission Daemon indicator
* Volume Mixer
… and others.
Make sure you enable the Gnome Shell Integration plugin on Firefox and you can install/[en/dis]able/remove/configure extensions directly from the website. Have a play – I am sure you will find some useful or fun extensions to use.
The best tip I’ve found it in this magazine!
It’s in Firefox: when you are in any search box on any website, Right Click > Add a Keyword for this Search.
That’s terrific:
in the url/searchbar, I can do so quickly:
‘am Linux Command Book’ –> Get me directly to amazon.com with the result search for “Linux Command Book”.
From the same page, I change now in the url bar: ‘map Bath’ –> Display a Google map search for Bath, UK.
And you can do it for practically any search. Brilliant
You can do anything. Doing it can take some thought, effort, and exploration. If dont know how, ask, find out, and tell someone else. Alternatively you can use Linux.
Delete your windows partition. I’m serious, this isn’t a “hur hur windows is teh suxx00r” thing. This is the best way to learn Linux.
When I was new to Linux I played with it for a couple of years but I knew windows really well and I could do pretty much anything with it. Frequently, I would hit a wall where I wanted to do something but couldn’t figure out how to do it in Linux, so I’d reboot into windows and write a quick VB script or batch file or whatever to get my task done. Things I would now do in half as many lines of bash or python.
Then, because I was in a familiar environment, I’d just leave windows running and keep it running for days, only rebooting into Linux occasionally, where I’d soon hit a wall again and reboot into windows again. I didn’t like not being able to get things done and feeling like a newbie again, so I’d run away to the familiar environment.
One day, at 3am, I was told that I needed to call microsoft to activate my (legit) windows version, and in a fit of rage I declared “to hell with windows forever” and deleted my windows partition.
I never looked back. Suddenly, I was forced to take the extra time to learn how to do those things that would have sent me running back to windows. Sure, I spent hours trying to figure out how to do trivial things, but I was learning. Within a few months I was feeling much more familiar and comfortable with Linux. Within a year or two I became one of those people who finds windows really limited and stifling.
Best way to learn Linux? Force yourself to – delete your windows partition.
i use this exclusively or searching:
“wiki ”
“ebay ”
“pira…uh…legitimately-download “
crap. This was meant to be a reply to Aubrey’s post about firefox keywords.
Pressing Ctrl-D to quit a terminal
zsh is to bash what an IDE is to a text editor, You should all try it. (As in it has to most usefull command/file completions when you press Tab)
If you use zsh: http://ohmyz.sh/
Also the thing that got me to switch to linux was being able to install it on a USB stick (non-live install) and take my entire operating system to and from School in my pocket. That way I could have all my files/settings/software automatically synced between any computer that can boot from a USB port.
A shell with Vim keybindings – how did I not try zsh before? Thanks for a great tip!
Learn about stdin and stdout and the use of |, it amazing what can be done by piping as few utils together.
If I were to advise a newbie, I’d told them not to shy away from the command line. It’s hard at the start, but soon enough it pays!
Save the last 10000 shell commands
HISTSIZE=10000; export HISTSIZE
Similarly, increase the scrollback buffer on terminal windows.
Use the script command to record command-line sessions.
I have my Documents on a separate partition which is quite big, and then symlink the folder to the home folder for each Linux distro I use. They then all have access to the same documents. The /home is also just one partition separate to those where Linux distros are installed.
Rename all .jpeg files to .jpg (current directory) in bash:
for FN in *.jpeg ; do mv “$FN” ${##FN.jpeg}.jpg ; done
There is a rename command for that
rename .jpeg .jpg *.jpeg
And those people should not be listened to who keep saying the voice of the people is the voice of God, since the riotousness of the crowd is always very close to madness. The usage indicates that the phrase had long since become an aphorism of common political wisdom by Alcuin and Charlemagne’s time, since Alcuin advised Charlemagne to resist such an idea.