Projects > Operating Systems >
(on Wikipedia)
An operating system of significant and historical renown, responsible for running most of the internet and phones (via Android).
See also:
-
To mix it with Windows, check out Windows Subsystem for Linux.
- See also /tag/linux+windows
- BSD, a cousin of Linux, which is also behind iOS (on iPhones).
- /tag/linux+howto
- Security > Computer security > Linux security
- Linux tools
-
- /tag/shell-scripting-languages (sh is the base)
-
Strongly tied with GNU software.
- Strong enough for there to be a
GNU/Linux
argument. An argument strong enough for me to want to side with just "Linux" by removing GNU software which has, for years, been abysmally-documented at best. It's better now, but the hate is still there.
- Strong enough for there to be a
- 1 What drove me to Linux
- 2 Some topics
- 3 Usage and troubleshooting
- 3.1 Configuration
- 3.2 In X-Windows, using the keyboard instead of a mouse
- 3.3 KDE ~/.thumbnails directory
- 3.4 Display commandline characters properly
- 3.5 Setting the date and time
- 3.6 C compiler cannot create executables
- 3.7 Linux and Scroll Mice
- 3.8 adding to the path
- 3.9 Partitioning schemes
- 3.10 directory indexing
- 3.11 start a second x session
- 3.12 cannot connect to X server :0.0
- 3.13 run a command as root (using Pam)
- 3.14 Speed improvements
- 4 Reading and resources
- 5 Stuff
- 6 Randomness
What drove me to Linux ∞
Written 2009-03-27.
What drove me from DOS to Windows 3.1 was internet access and web browsers.
What drove me away from Windows is its complete inability to back up and restore one's customizations. Since Windows has such broken defaults, I had to so heavily modify it that it took forever. None of it is (was?) scriptable and reproducible except through step-by-step instructions.
A fresh install required following the instructions step-by-step. Re-installing software from scratch, re-configuring everything and doing all kinds of fiddly nonsense. Plus, the better you get with it, the more customizations it required. It was disgusting.
This issue persists even now with Windows XP/Windows Vista. Although there are tools to do backup and restore I'm sure (for a price), I ended up sticking it out. As an aside, Windows has some interesting steady state concepts which I really liked, which kept the system writeable but reverted everything on reboot.
What drove me to Linux, and the only thing that made life bearable until recently was Firefox. Since Phoenix 0.2 or 0.3 as I recall.
I always expected Linux to have a trivial ability to change menus and hotkeys at compile time, but I've been sadly disappointed. Maybe there's something somewhere in internationalization. Since I largely stopped compiling software it doesn't matter much these days.
Now I can set up all my software and trivially back up and restore everything. Heck, I can even remaster my setup into a customized LiveCD. With one command.
I'm also finally learning how to script to solve the issues I have.
All of the documentation I've seen for anything Linux-related SUCKS ASS. That's something I'm working to address.
Some topics ∞
A hell of a lot of Linux-related topics are scattered throughout this place, but here are some which don't really have much of a home:
Getting Linux going:
- Linux distributions
- Making a USB stick bootable
- Booting multiple distributions from a USB stick
- Linux distribution booting from a USB drive which has a Windows-viewable partition
- Resetting the Linux root password
Other:
Usage and troubleshooting ∞
I've had a long, long history with Linux and I've had to learn things the hard way. I took lots of notes, some of which are embarrassingly obvious years later, and some of which are obsolete by now. Still, here they all are.
wall
-- Broadcast messages to all terminalsstrip
-- Discard symbols from object files.- Startup commands are in
/etc/rc.d/rc.local
- Learn the kernel version with
uname -r
-
permanently fix a video index:
- (MEncoder)
mencoder -idx input.avi -ovc copy -oac copy -o output.avi
- https://web.archive.org/web/20190915002303/http://www.brunolinux.com:80/01-First_Things_To_Know/Install_Cheatcodes.html
-
automatic inactivity logout:
- append to
/etc/profile
. These are overridden by values in .profile (if not readonly) export readonly TMOUT=600 (ksh) export readonly TIMEOUT=600 (bsh)
- append to
-
md5sum of a cd:
dd if=/dev/cdrom bs=2048 | md5sum
-
Set the current tty terminal to a certain size
resize -s 46 127
-
Ask before overwriting files.
- copy:
cp -i
- move:
mv -i
- copy:
-
Linux "TSRs"
- Run something from the shell which will persist even when the shell is closed.
nohup command&exit
-
Window title
- Set the title of the current terminal window
echo -e "\e]2;This is the new window title\a"
-
Appending to the path
export PATH="/foo/bar/baz/:$PATH
-
Adjusting reserved blocks
- (tune2fs)
tune2fs -m 1 /dev/hda10
-
You could create a dedicated file system with "-T largefile" or "-T largefile4" which will give you one inode for every one and four megabytes respectively. (untested)
Configuration ∞
See dotfiles
- Misc:
- X11
- X11 apps
- Blackbox > {{Fixme|config}}
In X-Windows, using the keyboard instead of a mouse ∞
(X)
Say you don't have a mouse, but you want to use X. Well, you can use X without a mouse..
from http://linux.topology.org/xcursor.html
You enable and disable it by hitting control-shift-numberlock
. The PC-speaker beeps.
Then you use the number pad to move around:
/ * - select mouse buttons: first, second, third in that order . 8 . becomes . up . 4 . 6 becomes left . right . 2 . becomes . down .
- Holding one of
2
,4
,6
,8
down and pressing number5
down speeds the mouse
up.
- Pressing
5
down on its own does amouse click
with the current button. - Pressing
+
down on its own does adouble-click
with the current button. 0
clicks and holds down the current button.-
.
releases the button that0
held down.
KDE ~/.thumbnails directory ∞
(KDE)
It's ok to delete the contents. Also see this script:
Display commandline characters properly ∞
(This is an older note from an older Slackware installation, and I don't know if it's accurate)
Make sure that extended characters are displayed properly at the commandline level:
~/.initrc
set convert-meta off set input-meta on set output-meta on
Setting the date and time ∞
See Linux date and time setting
C compiler cannot create executables ∞
./configure
creating cache ./config.cache checking host system type... i686-pc-linux-gnulibc1 checking for gcc... gcc checking whether the C compiler (gcc ) works... no configure: error: installation or configuration problem: C compiler cannot create executables.
Reproduced on Slackware 10.0, but has also been seen on earlier versions and could probably happen on other Linux distributions.
Resolution:
installpkg /mnt/cdrom/slackware/l/glibc-2.3.2-i486-6.tgz
or otherwise get GNU libc installed, probably best done with a package specific to your distro and version
For PCLinuxOS it is:
apt-get install gcc-g++
alternatively, on Unity Linux I once got:
configure: error: C++ compiler cannot create executables
and did
smart-root install gcc-g++
--
Later on, I solved it with
smart-root install gcc-c++
Linux and Scroll Mice ∞
Works under Slackware 10.0
/etc/X11/xorg.conf
# Enable the scroll wheel # Option "Protocol" "PS/2" Option "Protocol" "IMPS/2" Option "ZAxisMapping" "4 5"
adding to the path ∞
PATH="/usr/local/ActiveTcl/bin:$PATH" export PATH
or:
export PATH="/usr/local/X11/bin:$PATH"
Partitioning schemes ∞
I used to do things like this:
hda: 1 p ext3 8 (/boot?) 3 p fat16 500 5 l ext3 500 / rw,errors=remount-ro 6 l ext3 50 /var rw? 7 l ext3 50 /home rw? 8 l ext3 ~700 /tmp rw? 9 l ext3 1000 /usr rw? 10 l ext3 7000 /_archive rw,nosuid 11 l ext3 30000 /_mp3 rw,noexec,nosuid 2 p swap 200 (swap)
I don't have the security settings on me.. I think I mucked around briefly. Nothing special.
- 500MBs for
/
may not be enough later, but it's reasonable for now. /usr
shouldn't benosuid
, as some apps need it./usr
and/home
could have been mixed in with/archive
but I thought it would be cleaner to separate them. I may run out of room with a 1GB/usr
partition, but it's okay for now./home
partition was made solely to appease certain strange circumstances. Under most circumstances I'll be symlinking out from that partition into another to provide more space where necessary./var
holds logs, some keep this small to force awareness of runaway problems. Logs need to be rotated using a cron job.. I've been told that email and news goes here, which may be a bad thing, since I may need more space for news. Must confirm which apps use this space for news.-
One can fix large archive partitions to use less inodes to not waste so much disk space.
directory indexing ∞
Directory indexing is a performance enhancement:
tune2fs -O dir_index /dev/x
To re-index existing directories (must not be mounted):
e2fsck -D -f /dev/x
TODO - How do I know if a partition is already indexed?
start a second x session ∞
startx -- :1 vt8
- could be done to have a root x-session for administration
- could have another user with other tools, or another window manager
- .. might be able to have the same user with a different window manager, but that would require some voodoo.
-
I do this trivially with my Devuan as of 2016-12-12
cannot connect to X server :0.0 ∞
SOMEEXECUTABLE: cannot connect to X server :0.0
fix with
xhost +
.. revert with
xhost -
run a command as root (using Pam) ∞
Tested 2009-04-26 on PCLinuxOS (version not recorded)
2020-08-11 -- For some reason, BlogText is having a fit about editing this file when ../../
is inside of a code block.
As root, do:
\cd /usr/bin
\ln --symbolic ../../usr/bin/consolehelper leafpad-root
\cp /etc/pam.d/synaptic /etc/pam.d/leafpad-root \ln --symbolic /usr/bin/leafpad /usr/sbin/leafpad-root
Now I can do interesting things with the new leafpad-root
command.
For example, I could edit my Openbox rc.xml
and make a hotkey to edit a file as root.
<keybind key="A-S-F5"> <action name="Execute"> <command>leafpad-root /path/to/filename.ext</command> </action> </keybind>
Speed improvements ∞
Reading and resources ∞
- http://www.ibiblio.org/pub/Linux/
- https://web.archive.org/web/20200407103244/http://wiki.linuxquestions.org/
- Man Wiki -- A wiki for the Linux
man
pages. - https://web.archive.org/web/20080515111720/http://library.n0i.net/linux-unix/
- http://setuplinux.com/ -- General help
- [http://www.oesf.org/index.php?title=Little_used%2C_but_useful_command_line_apps little used commandline apps]
- 20 of the Best Free Linux Books
-
Linux Cheat Sheet
- "make computer faster" is a joke. Don't do that. Also, read the comments for more, and for.. comments.
- https://imgur.com/gallery/2TLbk
- https://imgur.com/gallery/Bb1c5
- http://www.topology.org/linux/
- https://pdfbear.com/whylinuxisbetter [ 1 ] was http://www.whylinuxisbetter.net/
- https://www.howtoforge.com/ -- Docs
- https://www.linuxjournal.com/
- https://web.archive.org/web/20161016142611/http://webgui.theblackmoor.net:80/home/linux
- www.linux-directory.com
- https://www.kclug.org/old_archives/linux-activists/ - Linux-Activists mailing list archives -- from as old as 1991!
- http://web.archive.org/web/20051013061123/http://www.cltb.net/en/
- http://dsl.org/cookbook/cookbook_toc.html
-
https://web.archive.org/web/20100929195444/http://www.linux.org/docs/online_books.html
Stuff ∞
- http://www-106.ibm.com/developerworks/linux/library/l-fireboot.html?ca=dgr-lnxw09FireBoot -- Boot linux from a firewire device
USB devices ∞
- https://web.archive.org/web/20100405193502/http://www.simonf.com:80/usb/ -- Booting Linux from a USB device.
- https://web.archive.org/web/20090316070335/http://www.neowin.net:80/forum/lofiversion/index.php/t269145.html -- booting from USB without BIOS support.
- https://www.linuxjournal.com/article/6687 -- SanDisk ImageMate Dual Reader
- https://www2.cs.sfu.ca/~ggbaker/personal/cf-linux -- Using a USB Card Reader in Linux
-
http://www.oreillynet.com/pub/wlg/5735 -- Utility to make USB flash drives bootable
Physical backups ∞
This project is dead because I decided to continue with doing backups on secondary and tertiary hard drives.
Randomness ∞
-
- was EwL0G9wK8j4
time
is used to determine how long a command takes.
Footnotes
Last updated 2020-12-29 at 02:15:40
The [[Linux]] genre was updated: tips and tricks, various Linux software, [[Linux distributions]], [[Slackware]], etc..
ported from an earlier CMS
ported
ported some tips and tricks here rather than to their own page..
ported a bunch more