Useful Commands and Tweaks for a Linux Environment


2012-07-17

I was making individual posts for Linux goodies (commands/shortcuts/etc) as I used them. I found that I would set up a good alias or do something special for my openbox rc.xml and then lose it when I inevitably had to reinstall my OS. Well the posts are getting a little out of hand, so from now on I will coagulate them here.

remount with read/write permission (root directory)
sudo mount -o remount,rw /

remount as read-only (root directory)
sudo mount -o remount,ro /

symbolic link
ln -s source_file link_name

bash alias
add a line to .bashrc in your home directory:
alias my_alias='/usr/bin/alias'

aero snappish behavior with openbox
add this to your rc.xml:
<keybind key="W-Left">
<action name="UnmaximizeFull"/>
<action name="MaximizeVert"/>
<action name="MoveResizeTo">
<width>50%</width>
</action>
<action name="MoveToEdgeWest"/>
</keybind>
<keybind key="W-Right">
<action name="UnmaximizeFull"/>
<action name="MaximizeVert"/>
<action name="MoveResizeTo">
<width>50%</width>
</action>
<action name="MoveToEdgeEast"/>
</keybind>
<keybind key="W-Up">
<action name="MaximizeFull"/>
</keybind>
and then use the Windows key (or Ubuntu Key!) and the directional keys to snap to the left, right, or maximize. Thanks to Ikem Krueger in the comments for pointing out the width can be set to 50% rather than manually entering your resolution width divided by 2.