> Linux Reviews >
Tips and Tricks
v1.0.3 (en)Quick and simple tips for a more productive day.
Things you may find handy to know
How to get bash to clean the screen after logging out?
echo "clear" >> .bash_logout
The file .bash_profile is loaded when you login. You can place aliases here. The file .bash_history keeps track of your last commands.
Mozilla and Firefox
- You can at any point press
ctrl-lin Mozilla and Firefox to get to the location bar.ctrl-landEnterwill reload the page (likectrl-r). ctrl-bgives quick access to bookmarksctrl-flets you search the current pagectrl-uwill show you the page sources
Simply run "xine /misc/cdrom" to play whatever content is on a CD with xine.
Cut and Paste in X
You can select any text in X-Windows using the mouse and instantly paste it by clicking on the third mouse button. Two button mouse users emulate three by pressing both. On modern mice the third button is commonly found on the mouse wheel.
Using bash and other shells
- Press tabulator to complete commands, filenames and other things. Try pressing the tabulator key after just two or three letter whens entering commands and filenames. If you want the command
xscreensaverin a shell you can simply typexscrand presstab. When lazy, try tab. Tab also works in GTK file dialog boxes.
How do I change the resolution in X?
You can change your resolution on the fly in X with the tool xrandr. This is a command line utility. You can do this in Gnome from the control panel.
KDE has a nice frontend called krandrtray. It can be used with most window managers, like fluxbox. krandrtray allows you to change Hz, resolution and control power saving features.
You can also change your resolution on the fly with ctrl + alt + + and ctrl + alt + -.
kate - kde text editor
Writing a list in kate? Press ctrl + enter instead of just enter at end of a line to start a the next new line with the beginning of the previous line.
X11 - Use the keyboard as mouse
You can turn mouse emulation on/off by pressing shift+num-lock. This allows you to use the number keypad as a mouse.
Is someone bothering and messing with you?
Then find their IP address in your logs and simply add this to your iptables firewall:
BADIP="24.83.73.244" iptables -A INPUT -i all -s $BADIP/24 -j DROP
-A regelsett-i nettverkskort, navngitt all, eth0, eth1-s kilden, nettverket eller IP som vi skal filtrere etter-j hva som skal gjøres. ACCEPT, DNAT og i dette tilfellet DROP.
Bruk iptables -L -v for å se gjeldene regelsett. Noen system vil automatisk lage dine iptables innstillinger ved utlogging.
- Gentoo brukere kan kjøre
/etc/init.d/iptables savefor å lagre gjeldende innstillinger.- IPv6:
/etc/init.d/ip6tables save
- IPv6:
- Fedora brukere kan gjøre
service iptables savefor å lagre gjeldende innstillinger.- RPM pakken
iptables-1.2.9-2.3.1for Fedora inkluderer ikke ip6tables.
- RPM pakken
You should make sure you have a firewall running with strict rules.
You can ensure that it is started at boot with the following commands:
- Gentoo:
rc-update add iptables default- IPv6:
rc-update add ip6tables default
- IPv6:
- Fedora:
chkconfig --level 35 iptables on
> Linux Reviews >
Tips and Tricks