Difference between revisions of "Linux"
m (→Components: gnome) |
|||
(79 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | <hide> | |
− | [[ | + | [[page type::article]] |
+ | [[thing type::operating system]] | ||
+ | </hide> | ||
+ | {{sidebar|__TOC__}} | ||
+ | '''This page badly needs some updating.''' | ||
==Articles== | ==Articles== | ||
− | * [[Linux | + | * '''concepts''' |
− | * [[Linux | + | ** [[/groups]] and user/group security |
− | * [[Linux | + | * '''reference''' |
+ | ** [[/commands]] | ||
+ | ** [[/file]]: things having to do with files | ||
+ | ** [[/font]]: managing fonts in Linux | ||
+ | ** [[Linux networking]] | ||
+ | *** [[wireless network cards in Linux|wireless]] | ||
+ | *** [[Network File System (protocol)|Network File System]] | ||
+ | ** [[Linux notes]]: unfiled notes relating to Linux stuff | ||
+ | ** [[Linux programming]] | ||
+ | ** [[DVDs in Linux]] | ||
+ | ** '''how to''' | ||
+ | *** [[/diacritics]]: how to set up your keyboard to enter accented characters and so forth | ||
+ | *** [[running a remote X session]] | ||
+ | *** [[rescuing files with a liveCD]] | ||
+ | *** [[ejecting reluctant CDs in Linux]] | ||
+ | ** '''practical applications of Linux''' | ||
+ | *** [[Linux for kids]] | ||
+ | * '''comparative''' | ||
+ | ** [[Linux distributions]]: different versions of Linux | ||
+ | ** [[Linux vs. Windows]] | ||
+ | ** [[Windows in Linux]]: various ways to run Windows applications within Linux | ||
+ | |||
+ | To rename a Linux box on the network (must be root or use [[sudo]]): | ||
+ | * Edit /etc/hostname -- this is a file which contains just the computer's name | ||
+ | * If the box is running [[Samba]], restart [[nmbd]] | ||
===Components=== | ===Components=== | ||
+ | ====Audio==== | ||
+ | * [[Linux audio]] | ||
+ | ** [[Linux audio production]]: multitrack and high-rate/depth editing | ||
+ | ** [[Linux music production]]: musical instrument synthesis | ||
+ | ** [[Audacity]] | ||
+ | ** [http://wiki.ubuntustudio.org/ Ubuntu Studio] | ||
====Desktop Environments==== | ====Desktop Environments==== | ||
* [[KDE]] | * [[KDE]] | ||
** [[Konqueror]] | ** [[Konqueror]] | ||
* [[Gnome]] | * [[Gnome]] | ||
− | + | * '''window managers''' | |
− | ===[[ | + | ** [[KWin]] (standard for KDE) |
− | + | ** [[Beryl (window manager)|Beryl]] | |
− | === | + | * [http://www.bumptop.com/ BumpTop]: it's not clear if this is an environment, a desktop manager, or what; also what platforms it will be available for, when it is available (which it isn't yet) |
− | * [[Linux | + | * '''desktop widgets''' |
− | * [[Linux | + | ** [http://conky.sourceforge.net/ Conky], "a lightweight system monitor" that looks highly configurable |
+ | ====Devices==== | ||
+ | * [[device management (Linux)|device management]]: udev and related system things | ||
+ | * printing: [[Common Unix Printing System]] (CUPS) | ||
+ | * [[audio (Linux)|audio]] | ||
+ | ===Applications=== | ||
+ | * [[K3b]] | ||
+ | ===Hardware=== | ||
+ | * [[Common Unix Printing System]] | ||
+ | * '''on laptops''': | ||
+ | ** [[SUSE on a Thinkpad A30]] | ||
+ | ** [[/touchpad]] | ||
+ | ** [http://linux.toshiba-dme.co.jp/linux/ Linux information for Toshiba PCs] | ||
+ | * '''Modems''' | ||
+ | ** [http://linmodems.technion.ac.il/ LinModems]: running nonstandard driver-dependent modems in Linux | ||
+ | * [[wireless network cards in Linux|wireless network cards]] | ||
+ | * [[optical scanners in Linux|optical scanners]] | ||
+ | * [[webcams in Linux|webcams]] | ||
* Commands: | * Commands: | ||
− | ** | + | ** [[dmesg]]|[[tail]] - somehow helps figure out what [[USB]] devices have been detected |
− | ** | + | ** [[lsusb]] - lists all [[USB]] devices found |
+ | ** [[lspci]] - lists all [[PCI]] devices found | ||
+ | ** '''network-related''' (see also [[Samba]]) | ||
+ | *** [[nmap]] | ||
− | === | + | ===Firmware=== |
− | * [ | + | * [http://linuxbios.org/ LinuxBIOS] |
− | + | ===Support Groups=== | |
− | + | * United States: North Carolina: Triangle Area: | |
− | + | ** [http://trilug.org/ Triangle Area Linux Users Group] | |
− | * | ||
− | |||
− | ** | ||
− | |||
− | |||
− | |||
− | |||
==Reference Links== | ==Reference Links== | ||
− | *[http://tuxmobil.org/ TuxMobil]: Linux With Laptops, Notebooks, PDAs and Mobile Cell Phones | + | * [http://tldp.org/ The Linux Documentation Project]: lots of documentation, somewhat awkwardly presented |
− | *[http://www.reallylinux.com/ Really Linux]: for beginning Linux users | + | ** [http://www.tldp.org/LDP/intro-linux/html/ Introduction to Linux] |
− | *[http://wiki.linuxquestions.org/ LinuxQuestions wiki] | + | *** [http://tldp.org/LDP/intro-linux/html/sect_04_02.html 4.2. Boot process, Init and shutdown] |
− | *[http://linux.ctyme.com/ Linux Manpages]: [[manpages]] documentation as searchable web pages | + | * [http://elinux.org/Main_Page Embedded Linux Wiki] |
− | *[http://arstechnica.com/guides/tweaks/linux-audio.ars Linux audio]: guide to audio apps/systems in Linux | + | * [http://tuxmobil.org/ TuxMobil]: Linux With Laptops, Notebooks, PDAs and Mobile Cell Phones |
− | *[http://www.net-security.org/article.php?id=809 Securing Linux] | + | * [http://www.reallylinux.com/ Really Linux]: for beginning Linux users |
− | *[http://opensourceversus.com/modules.php?op=modload&name=News&file=article&sid=155&mode=thread&order=0&thold=0 Windows vs. Linux]: comparative screenshots | + | * [http://wiki.linuxquestions.org/ LinuxQuestions wiki] |
+ | * [http://linux.ctyme.com/ Linux Manpages]: [[manpages]] documentation as searchable web pages | ||
+ | * [http://arstechnica.com/guides/tweaks/linux-audio.ars Linux audio]: guide to audio apps/systems in Linux | ||
+ | * [http://www.net-security.org/article.php?id=809 Securing Linux] | ||
+ | * [http://opensourceversus.com/modules.php?op=modload&name=News&file=article&sid=155&mode=thread&order=0&thold=0 Windows vs. Linux]: comparative screenshots | ||
+ | * 2005-08-30 [http://www.freedesktop.org/~jonsmirl/graphics.html The State of Linux Graphics]: technical backgrounder | ||
+ | |||
+ | ==News/Opinion Links== | ||
+ | * '''2008-01-07''' [http://linuxdevices.com/news/NS2593777857.html Linux-based PMP features head-worn display]: "A new Linux-based [[portable media player]] (PMP) is equipped with a 0.44-inch, head-mounted [[OLED]] microdisplay visor with 800 x 600 resolution. Dreamax's Indicube i-800 PMP offers an experience equivalent to sitting seven feet from a 54-inch screen, the vendor claims." | ||
+ | * '''2007-03-13''' [http://online.wsj.com/article_email/SB117374336173334742-lMyQjAxMDE3NzEzMjcxNDIzWj.html Linux Starts to Find Home on Desktops] | ||
+ | * '''2006-06-28''' [http://www.thejemreport.com/mambo/content/view/261/1/ Linux desktop distributions are headed in the wrong direction] | ||
==Issues== | ==Issues== | ||
The following may reflect [[User:Woozle|my]] own ignorance rather than an actual shortcoming in Linux: | The following may reflect [[User:Woozle|my]] own ignorance rather than an actual shortcoming in Linux: | ||
*Development | *Development | ||
− | **There appears to be no mechanism corresponding to [[ActiveX]] (as used for desktop app development) | + | **There appears to be no universal mechanism corresponding to [[ActiveX]] (as used for desktop app development); [[DCOP]], which seems at least somewhat similar, is only available under [[KDE]] |
− | **There appears to be no application corresponding to [[Microsoft Access]]. Yes, you can do all the same stuff with various available tools, but not quickly; v2.0 of [[OpenOffice]] is apparently going to include a tool which may be a step in the right direction... | + | **There appears to be no application corresponding to [[Microsoft Access]]. Yes, you can do all the same stuff with various available tools, but not quickly; v2.0 of [[OpenOffice]] is apparently going to include a tool which may be a step in the right direction (OpenOffice Base), and I have seen evidence of other Access-like tools in development... |
*Regular Use | *Regular Use | ||
− | **In Windows, if you create a link to an executable script (batch file -- *.bat) on your desktop (or anywhere), the link is executable with a double-click. | + | **In [[Windows (Microsoft)|Windows]], if you create a link to an executable script (batch file -- *.bat) on your desktop (or anywhere), the link is executable with a double-click. Linux [[.sh]] (shell script) files are equivalent to Windows .bat files, and much more powerful, but can't be executed by clicking on them directly (at least, not in the standard/default configuration). The exact procedure depends on the environment you are using: |
+ | *** '''[[KDE]]''': right-click on the desktop and select Create New -> Link to Application...; when the dialog pops up, select the Application tab, and then next to the "Command:" edit box click the "Browse..." button to browse for the .sh file. | ||
Criticisms of UNIX, from which Linux is derived: [http://www.informit.com/articles/article.asp?p=424451&rl=1 10 Things I Hate About UNIX] | Criticisms of UNIX, from which Linux is derived: [http://www.informit.com/articles/article.asp?p=424451&rl=1 10 Things I Hate About UNIX] | ||
Line 54: | Line 112: | ||
==Things You Must Know== | ==Things You Must Know== | ||
In Linux, you often run into things which you Just Have To Know in order to make things work; there is not really any way to find them out. This is bad UI design, but for now it's the situation. I will be listing them here as I find them out. | In Linux, you often run into things which you Just Have To Know in order to make things work; there is not really any way to find them out. This is bad UI design, but for now it's the situation. I will be listing them here as I find them out. | ||
+ | * If you accidentally hit Ctrl-Z (control Z), this suspends your current process and pops you back to the command line. To get back to the suspended process, type the command {{linuxcmd|fg}}. | ||
* When Perl is missing a module, the package name is always (I am told) "perl-libraryname". For example, for Tk.pm, the package is perl-Tk. So in Fedora you would type "yum install perl-Tk". Presumably in debian-derived distributions, you would type "apt-get install perl-Tk", though I have not actually tested this. (Remember that package names, like Linux filenames, are case-sensitive, so that T must be uppercase or it won't work.) If the library is within a Perl package, e.g. Net::Telnet, then the format is perl-Package-Library, e.g. perl-Net-Telnet. | * When Perl is missing a module, the package name is always (I am told) "perl-libraryname". For example, for Tk.pm, the package is perl-Tk. So in Fedora you would type "yum install perl-Tk". Presumably in debian-derived distributions, you would type "apt-get install perl-Tk", though I have not actually tested this. (Remember that package names, like Linux filenames, are case-sensitive, so that T must be uppercase or it won't work.) If the library is within a Perl package, e.g. Net::Telnet, then the format is perl-Package-Library, e.g. perl-Net-Telnet. | ||
− | * To run a binary which is located in the current directory, from the command line, you have to type "./" before the binary's name. | + | * To run a binary which is located in the current directory, from the command line, you have to type "./" before the binary's name. This is because the current directory (most easily referenced with "./") is, by default, not included in the binary search path. There is much debate about whether or not this is a good thing, but at least it can be changed easily: |
+ | :* This command only changes the path for the current session: | ||
+ | {{linuxcmd|export}} PATH=$PATH:. | ||
+ | :* To permanently change the default path for the current user, edit the [[~/.bash_profile]] file | ||
+ | :* To permanently change the default path for all users (which may be overridden by individual user settings), edit the [[/etc/profile]] file | ||
* Linuxese for "help" is "[[manpages|man]]", which is short for "manual". This help system is often referred to as "the manpages". | * Linuxese for "help" is "[[manpages|man]]", which is short for "manual". This help system is often referred to as "the manpages". | ||
+ | * '''To find out what version''' of the [[Linux kernel]] you are running: | ||
+ | ** {{linuxcmd|cat}} /proc/version | ||
+ | * Sometimes the [[GUI]] shutdown (in [[KDE]], usually invoked via the K menu) mysteriously fails to work; in that case, you can invoke a shutdown using the {{linuxcmd|shutdown}} command: | ||
+ | ** {{linuxcmd|shutdown}} now | ||
+ | * To find out what processes have locked a file (so you can {{linuxcmd|kill}} them to allow editing again... but also make sure it's not a simple permissions problem first): | ||
+ | ** {{linuxcmd|lsof}} <u>/path/to/file</u> | ||
+ | * To add a user to a group (or a group to a user, however you want to say it): | ||
+ | ** {{linuxcmd|usermod}} -G <u>groupname</u> -a <u>username</u> | ||
+ | |||
==How To== | ==How To== | ||
− | + | ===disable the middle mouse button=== | |
+ | Some people find that the scroll-wheel is too easy to click (which counts as a middle mouse-button click), accidentally pasting text in the middle of documents they are scrolling through. The wheel can be disabled by following [https://wiki.ubuntu.com/X/Config/Input#Example:_Disabling_middle-mouse_button_paste_on_a_scrollwheel_mouse these instructions], with a note that the actual disabling command – <bash>xinput set-button-map 4 1 0 3</bash> – needs to be modified by replacing "4" with whatever the actual ID of your mouse is. | ||
+ | ===rename the computer=== | ||
+ | To change the string a server uses for identifying itself on the network, see [http://www.debianadmin.com/change-hostname-or-server-name-of-a-linux-machine.html these instructions] (for [[Debian]]; other [[Linux distribution|distro]]s may differ). | ||
+ | ===adjust invisible free space=== | ||
+ | Sometimes, deleting files from a full drive doesn't seem to free up any space; {{l/sub|df}} will report fewer blocks used than available, but zero bytes available. This is apparently because the system reserves some space for system activities -- which is probably not necessary on a drive that is being used only for storage. | ||
+ | |||
+ | This command will adjust the reserved space to 1% (which is apparently lower than the default): | ||
+ | <bash>tune2fs -m 1 /dev/sda</bash> | ||
+ | ===mount an ISO image as a folder=== | ||
[[mount]] -o loop NameOfISO.iso /mount/wherever | [[mount]] -o loop NameOfISO.iso /mount/wherever | ||
+ | ''On older distributions, you may need instead ''[[mount]] -o loop -t iso9660 ... | ||
*To swap drives so DOS or Windows can be booted off the 2nd drive: | *To swap drives so DOS or Windows can be booted off the 2nd drive: | ||
− | **On reboot, when you get to the boot loader startup, select whatever option gets you to a | + | **On reboot, when you get to the boot loader startup, select whatever option gets you to a {{l/sub|grub}} command line ("c" in Fedora Core) |
**At the grub prompt, enter the following: | **At the grub prompt, enter the following: | ||
map (hd0) (hd1) | map (hd0) (hd1) | ||
Line 70: | Line 152: | ||
boot | boot | ||
This is a temporary fix which lets you test the changes without making your computer unbootable if they fail. To make the changes permanent, edit /boot/grub/menu.lst and enter the two "map" lines under the Windows entry. (Will document in more detail when I have time to look at the format of menu.lst. I'm also not sure if "hd" is always the prefix for the drives or if that might be different depending on the types of drives – e.g. SATA, ATA, IDE – involved.) | This is a temporary fix which lets you test the changes without making your computer unbootable if they fail. To make the changes permanent, edit /boot/grub/menu.lst and enter the two "map" lines under the Windows entry. (Will document in more detail when I have time to look at the format of menu.lst. I'm also not sure if "hd" is always the prefix for the drives or if that might be different depending on the types of drives – e.g. SATA, ATA, IDE – involved.) | ||
− | + | ||
+ | ===fix a messed-up time-zone=== | ||
+ | If the [[KDE]] Clock-setting widget seems to be refusing to set the time zone (or your system clock is refusing to show anything except GMT time), this command may work: | ||
ln -s /usr/share/zoneinfo/America/NewYork /etc/localtime | ln -s /usr/share/zoneinfo/America/NewYork /etc/localtime | ||
...where "/America/NewYork" should be replaced by the appropriate file for your time zone. I have not been able to find any documentation on this feature; the command was suggested to me by someone in the #kde chat room at irc.freenode.net (see [http://freenode.net/]). Remember to use the console "date" command to verify what the system clock is currently set to. --[[User:Woozle|Woozle]] 08:45, 23 Apr 2005 (CST) | ...where "/America/NewYork" should be replaced by the appropriate file for your time zone. I have not been able to find any documentation on this feature; the command was suggested to me by someone in the #kde chat room at irc.freenode.net (see [http://freenode.net/]). Remember to use the console "date" command to verify what the system clock is currently set to. --[[User:Woozle|Woozle]] 08:45, 23 Apr 2005 (CST) | ||
− | + | ===force an update of the system clock=== | |
ntpdate pool.ntp.org | ntpdate pool.ntp.org | ||
− | *To make this update run automatically, go into root and run kcron (or cron if you're comfortable with [[CLI]] | + | *To make this update run automatically, go into root and run kcron (or {{linuxcmd|cron}} if you're comfortable with [[CLI]], but note that you will need the exact path to ntpdate when creating the entry in cron (cron apparently runs with a different $PATH than the user environment). Use "{{linuxcmd|which}} ntpdate" to find the path. |
*'''Emptying the Trash''': KDE does have trash-management built in, but it's not always obvious. You can do any of the following: | *'''Emptying the Trash''': KDE does have trash-management built in, but it's not always obvious. You can do any of the following: | ||
**Navigate (in Konqueror) to "trash:/", then right-click on the panel showing the contents, and select "Empty trash". | **Navigate (in Konqueror) to "trash:/", then right-click on the panel showing the contents, and select "Empty trash". | ||
**Right-click on the applet panel and add the Trash applet, then left-click on it to use its various functions. | **Right-click on the applet panel and add the Trash applet, then left-click on it to use its various functions. | ||
**Create a new URL link on the desktop, give it the URL "trash:/", then right-click on it (my preferred solution). A trashcan icon is available in the "filesystems" icon group. | **Create a new URL link on the desktop, give it the URL "trash:/", then right-click on it (my preferred solution). A trashcan icon is available in the "filesystems" icon group. | ||
− | === | + | |
− | + | ===reset the ftp [[kioslave]]=== | |
− | + | [[Konqueror]]'s ftp access is done using a [[kioslave]] (kio_ftp), and sometimes that kioslave apparently stops responding, leading to Konqueror hanging while showing the message "Connecting..." in the status bar. The obvious thing to do is kill the kioslave and start over; I haven't yet been successful at this, but I was given this command to try (probably will work better as root): | |
− | + | {{linuxcmd|killall}} -9 <u>process name</u> | |
− | + | ...where <u>process name</u> might be something like "kio_ftp". (Check the process list for helpful hints.) | |
− | + | ||
− | .. | + | ===Firewalls=== |
− | * | + | Some Linux distributions come with a GUI-based firewall management tool, but these generally are just wrappers around a set of text commands. Apparently, a firewall can be set up using {{linuxcmd|iptables}} (or {{linuxcmd|ipchains}}, although this is generally deprecated in newer systems); to query both commands for firewall rules: |
+ | {{linuxcmd|iptables}} -L -v | ||
+ | {{linuxcmd|ipchains}} -L -v | ||
+ | In Fedora Core 4, iptables is hidden in sbin, so you need to type it like this: | ||
+ | /sbin/{{linuxcmd|iptables}} -L -v | ||
+ | There also seems to be a GUI app to configure the firewall (see [http://fedora.redhat.com/docs/fedora-install-guide-en/fc4/ch-security-config.html#sn-firewall-settings this]), but it's not clear how to run it. It may be that it can only be run at setup time. Try {{linuxcmd|system-config-securitylevel}}. | ||
+ | |||
+ | ===Set up VNC to use an existing session=== | ||
+ | This sets up VNC to connect to an existing session, i.e. "control the user's screen", same as the default VNC server behavior in Windows. I have not tested it. | ||
+ | |||
+ | * edit [[xorg.conf]] | ||
+ | * find the "Module" section | ||
+ | * make sure you're loading the vnc module | ||
+ | * run [[vncpasswd]] (command) as root to set a password for the vnc server | ||
+ | * in the "Screen" section of xorg.conf, add this: | ||
+ | ** Option "PasswordFile" "/root/.vnc/passwd" | ||
+ | * save xorg.conf if you changed it |
Latest revision as of 13:54, 30 July 2020
This page badly needs some updating.
Articles
- concepts
- /groups and user/group security
- reference
- /commands
- /file: things having to do with files
- /font: managing fonts in Linux
- Linux networking
- Linux notes: unfiled notes relating to Linux stuff
- Linux programming
- DVDs in Linux
- how to
- /diacritics: how to set up your keyboard to enter accented characters and so forth
- running a remote X session
- rescuing files with a liveCD
- ejecting reluctant CDs in Linux
- practical applications of Linux
- comparative
- Linux distributions: different versions of Linux
- Linux vs. Windows
- Windows in Linux: various ways to run Windows applications within Linux
To rename a Linux box on the network (must be root or use sudo):
- Edit /etc/hostname -- this is a file which contains just the computer's name
- If the box is running Samba, restart nmbd
Components
Audio
- Linux audio
- Linux audio production: multitrack and high-rate/depth editing
- Linux music production: musical instrument synthesis
- Audacity
- Ubuntu Studio
Desktop Environments
- KDE
- Gnome
- window managers
- BumpTop: it's not clear if this is an environment, a desktop manager, or what; also what platforms it will be available for, when it is available (which it isn't yet)
- desktop widgets
- Conky, "a lightweight system monitor" that looks highly configurable
Devices
- device management: udev and related system things
- printing: Common Unix Printing System (CUPS)
- audio
Applications
Hardware
- Common Unix Printing System
- on laptops:
- Modems
- LinModems: running nonstandard driver-dependent modems in Linux
- wireless network cards
- optical scanners
- webcams
- Commands:
Firmware
Support Groups
- United States: North Carolina: Triangle Area:
Reference Links
- The Linux Documentation Project: lots of documentation, somewhat awkwardly presented
- Embedded Linux Wiki
- TuxMobil: Linux With Laptops, Notebooks, PDAs and Mobile Cell Phones
- Really Linux: for beginning Linux users
- LinuxQuestions wiki
- Linux Manpages: manpages documentation as searchable web pages
- Linux audio: guide to audio apps/systems in Linux
- Securing Linux
- Windows vs. Linux: comparative screenshots
- 2005-08-30 The State of Linux Graphics: technical backgrounder
News/Opinion Links
- 2008-01-07 Linux-based PMP features head-worn display: "A new Linux-based portable media player (PMP) is equipped with a 0.44-inch, head-mounted OLED microdisplay visor with 800 x 600 resolution. Dreamax's Indicube i-800 PMP offers an experience equivalent to sitting seven feet from a 54-inch screen, the vendor claims."
- 2007-03-13 Linux Starts to Find Home on Desktops
- 2006-06-28 Linux desktop distributions are headed in the wrong direction
Issues
The following may reflect my own ignorance rather than an actual shortcoming in Linux:
- Development
- There appears to be no universal mechanism corresponding to ActiveX (as used for desktop app development); DCOP, which seems at least somewhat similar, is only available under KDE
- There appears to be no application corresponding to Microsoft Access. Yes, you can do all the same stuff with various available tools, but not quickly; v2.0 of OpenOffice is apparently going to include a tool which may be a step in the right direction (OpenOffice Base), and I have seen evidence of other Access-like tools in development...
- Regular Use
- In Windows, if you create a link to an executable script (batch file -- *.bat) on your desktop (or anywhere), the link is executable with a double-click. Linux .sh (shell script) files are equivalent to Windows .bat files, and much more powerful, but can't be executed by clicking on them directly (at least, not in the standard/default configuration). The exact procedure depends on the environment you are using:
- KDE: right-click on the desktop and select Create New -> Link to Application...; when the dialog pops up, select the Application tab, and then next to the "Command:" edit box click the "Browse..." button to browse for the .sh file.
- In Windows, if you create a link to an executable script (batch file -- *.bat) on your desktop (or anywhere), the link is executable with a double-click. Linux .sh (shell script) files are equivalent to Windows .bat files, and much more powerful, but can't be executed by clicking on them directly (at least, not in the standard/default configuration). The exact procedure depends on the environment you are using:
Criticisms of UNIX, from which Linux is derived: 10 Things I Hate About UNIX
Things You Must Know
In Linux, you often run into things which you Just Have To Know in order to make things work; there is not really any way to find them out. This is bad UI design, but for now it's the situation. I will be listing them here as I find them out.
- If you accidentally hit Ctrl-Z (control Z), this suspends your current process and pops you back to the command line. To get back to the suspended process, type the command fg.
- When Perl is missing a module, the package name is always (I am told) "perl-libraryname". For example, for Tk.pm, the package is perl-Tk. So in Fedora you would type "yum install perl-Tk". Presumably in debian-derived distributions, you would type "apt-get install perl-Tk", though I have not actually tested this. (Remember that package names, like Linux filenames, are case-sensitive, so that T must be uppercase or it won't work.) If the library is within a Perl package, e.g. Net::Telnet, then the format is perl-Package-Library, e.g. perl-Net-Telnet.
- To run a binary which is located in the current directory, from the command line, you have to type "./" before the binary's name. This is because the current directory (most easily referenced with "./") is, by default, not included in the binary search path. There is much debate about whether or not this is a good thing, but at least it can be changed easily:
- This command only changes the path for the current session:
export PATH=$PATH:.
- To permanently change the default path for the current user, edit the ~/.bash_profile file
- To permanently change the default path for all users (which may be overridden by individual user settings), edit the /etc/profile file
- Linuxese for "help" is "man", which is short for "manual". This help system is often referred to as "the manpages".
- To find out what version of the Linux kernel you are running:
- cat /proc/version
- Sometimes the GUI shutdown (in KDE, usually invoked via the K menu) mysteriously fails to work; in that case, you can invoke a shutdown using the shutdown command:
- shutdown now
- To find out what processes have locked a file (so you can kill them to allow editing again... but also make sure it's not a simple permissions problem first):
- lsof /path/to/file
- To add a user to a group (or a group to a user, however you want to say it):
- usermod -G groupname -a username
How To
disable the middle mouse button
Some people find that the scroll-wheel is too easy to click (which counts as a middle mouse-button click), accidentally pasting text in the middle of documents they are scrolling through. The wheel can be disabled by following these instructions, with a note that the actual disabling command – <bash>xinput set-button-map 4 1 0 3</bash> – needs to be modified by replacing "4" with whatever the actual ID of your mouse is.
rename the computer
To change the string a server uses for identifying itself on the network, see these instructions (for Debian; other distros may differ).
adjust invisible free space
Sometimes, deleting files from a full drive doesn't seem to free up any space; df will report fewer blocks used than available, but zero bytes available. This is apparently because the system reserves some space for system activities -- which is probably not necessary on a drive that is being used only for storage.
This command will adjust the reserved space to 1% (which is apparently lower than the default): <bash>tune2fs -m 1 /dev/sda</bash>
mount an ISO image as a folder
mount -o loop NameOfISO.iso /mount/wherever On older distributions, you may need instead mount -o loop -t iso9660 ...
- To swap drives so DOS or Windows can be booted off the 2nd drive:
- On reboot, when you get to the boot loader startup, select whatever option gets you to a grub command line ("c" in Fedora Core)
- At the grub prompt, enter the following:
map (hd0) (hd1) map (hd1) (hd0) rootnoverify (hd1,0) chainloader +1 makeactive boot
This is a temporary fix which lets you test the changes without making your computer unbootable if they fail. To make the changes permanent, edit /boot/grub/menu.lst and enter the two "map" lines under the Windows entry. (Will document in more detail when I have time to look at the format of menu.lst. I'm also not sure if "hd" is always the prefix for the drives or if that might be different depending on the types of drives – e.g. SATA, ATA, IDE – involved.)
fix a messed-up time-zone
If the KDE Clock-setting widget seems to be refusing to set the time zone (or your system clock is refusing to show anything except GMT time), this command may work:
ln -s /usr/share/zoneinfo/America/NewYork /etc/localtime
...where "/America/NewYork" should be replaced by the appropriate file for your time zone. I have not been able to find any documentation on this feature; the command was suggested to me by someone in the #kde chat room at irc.freenode.net (see [1]). Remember to use the console "date" command to verify what the system clock is currently set to. --Woozle 08:45, 23 Apr 2005 (CST)
force an update of the system clock
ntpdate pool.ntp.org
- To make this update run automatically, go into root and run kcron (or cron if you're comfortable with CLI, but note that you will need the exact path to ntpdate when creating the entry in cron (cron apparently runs with a different $PATH than the user environment). Use "which ntpdate" to find the path.
- Emptying the Trash: KDE does have trash-management built in, but it's not always obvious. You can do any of the following:
- Navigate (in Konqueror) to "trash:/", then right-click on the panel showing the contents, and select "Empty trash".
- Right-click on the applet panel and add the Trash applet, then left-click on it to use its various functions.
- Create a new URL link on the desktop, give it the URL "trash:/", then right-click on it (my preferred solution). A trashcan icon is available in the "filesystems" icon group.
reset the ftp kioslave
Konqueror's ftp access is done using a kioslave (kio_ftp), and sometimes that kioslave apparently stops responding, leading to Konqueror hanging while showing the message "Connecting..." in the status bar. The obvious thing to do is kill the kioslave and start over; I haven't yet been successful at this, but I was given this command to try (probably will work better as root):
killall -9 process name
...where process name might be something like "kio_ftp". (Check the process list for helpful hints.)
Firewalls
Some Linux distributions come with a GUI-based firewall management tool, but these generally are just wrappers around a set of text commands. Apparently, a firewall can be set up using iptables (or ipchains, although this is generally deprecated in newer systems); to query both commands for firewall rules:
iptables -L -v ipchains -L -v
In Fedora Core 4, iptables is hidden in sbin, so you need to type it like this:
/sbin/iptables -L -v
There also seems to be a GUI app to configure the firewall (see this), but it's not clear how to run it. It may be that it can only be run at setup time. Try system-config-securitylevel.
Set up VNC to use an existing session
This sets up VNC to connect to an existing session, i.e. "control the user's screen", same as the default VNC server behavior in Windows. I have not tested it.