• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Some _VERY_ basic *nix documentation.

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.
To compliment BBWF's post:

*** from mozdev
How do I install Macromedia Flash Player?

Download Macromedia Flash Player 6. Packages are available for many distributions. Once downloaded, copy libflashplayer.so and flashplayer.xpt to your browser's plugins directory.
 
thanks

even dumber question

in konsole i login as root but it still only shows the desktop and documents etc

do I need to do that from a non graphic enviroment and if so how do i start the graphics back (mandrake 9.2...last time i logged out of the graphics i had to reinstall to get back in 🙁 < Yep I'm as green as they come) Sorry and thank you

Mike
 
Originally posted by: n0cmonkey
Originally posted by: cleverhandle
Nice. Hadn't you done one of these quite some time back too?

Kinda sorta. This is "building" on something electrode started a while back. Not sure how much of his original work is left though. :evil:

I do think ln needs some more explanation - something like...

ln - Use this to create a link. Usually, you want ln -s to create a "symbolic link," which is roughly equivalent to a Windows shortcut. The syntax is ln -s target shortcut. To avoid some complexity, use absolute path names for both the target and the shortcut (i.e. "/usr/bin/mozilla", not just "mozilla").

ln was a quicky at work, so it will get more attention. Thanks.

what happened to Electrode?
 
Originally posted by: pitupepito2000
Originally posted by: n0cmonkey
Originally posted by: cleverhandle
Nice. Hadn't you done one of these quite some time back too?

Kinda sorta. This is "building" on something electrode started a while back. Not sure how much of his original work is left though. :evil:

I do think ln needs some more explanation - something like...

ln - Use this to create a link. Usually, you want ln -s to create a "symbolic link," which is roughly equivalent to a Windows shortcut. The syntax is ln -s target shortcut. To avoid some complexity, use absolute path names for both the target and the shortcut (i.e. "/usr/bin/mozilla", not just "mozilla").

ln was a quicky at work, so it will get more attention. Thanks.

what happened to Electrode?

Not sure. Haven't seen him post in a long time.
 
Originally posted by: Klixxer
Very nicely done n0cmonkey.

I have been runnin Xenix/Unix/Linux/BSD for a long time and i found out some things i didn't know from that, guess i have been too lazy and just found harder ways to do things.

Regarding locate (which is really slocate in Linux but both syntaxes work in most distros) there is a database that is used by locate (which is what makes locate so much faster than find) that needs to be rebuilt at times, usually this is handled automatically by cron if you keep your computer on at night but otherwise you have to run "locate -u" or "updatedb" to update that database, this is important on some systems because they rely upon that database to verify dependancies.

Thanks, I'll make sure I include that information in the doc. 🙂

I consider a *nix doc to be great when I learn something I didn't know before (if it is something I knew something about 😉). I read great docs all the time, there's always something to learn.
 
Originally posted by: groovin
clean, functional documentation with lots of focus on common posix/unix commands....

you must be a slackware user! =)

Good documentation? Must be a BSD user. 😉
 
Psst you guys are great I got the plug in installed and I am tiptoeing out of your thread

sorry for the hijack...and shutdown -r now is not an option 🙁

win xp was running unstable due to a bad satadrive...wouldn't last 10 min in xp ...has been running 2 days straight in mandrake😛

Mike
 
Originally posted by: Wolfsraider
Psst you guys are great I got the plug in installed and I am tiptoeing out of your thread

sorry for the hijack...and shutdown -r now is not an option 🙁

win xp was running unstable due to a bad satadrive...wouldn't last 10 min in xp ...has been running 2 days straight in mandrake😛

Mike

Sounds like a bad SATA driver for windows. Reinstall?
 
pushd seems to be a non-standard bash built-in application. It won't be included. As soon as I convert the HTML to fusetalk, I'll update the info in the first post.
 
I wanted to add something to this, but forgot what it was... Cleaned some other stuff up though. Nicole Richie is a dumbass. 😛
 
I'm gonna put this one aside for a bit (unless I get more suggestions) and start working on a hierarchy explanation. If someone is looking for a silly busy work style perl project, make an HTML to fusetalk converter so I stop saving over my html files. 😛
 
Originally posted by: BingBongWongFooey
Like converting < i > to [ i ] and whatnot?

Yeah, basically. I'm doing this in wordpad, since I've been writing most of this at work. I just do a find and replace for <I>, <B>, <BR> and the closing tags for each. I'll probably just whip up a sed script to do it eventually, but that requires time and motivation. 😛

This was originally in html because I built off of what I put up on my site. The final piece will go back up, so I've been trying to keep it HTMLized for my sanity. 😉

I was just thinking that if someone is learning perl and wants a silly little project to do just giggles or whatnot, this might be right up their alley. It shouldn't take too much work, and someone experienced could probably write a script in less time than it's taken me to make this post (DAMN YOU JRUN!). 😉
 
Pipe through:

perl -pe 's,<(/?[ib])>,[$1],ig; s/<br>//ig; s,<a\s+href="(.*?)">(.*?)</a>,\$2,ig;'

Seems to work.

I'm not sure if you want to turn <br> into nothing (since your html probably already has a line break there), or if you want to turn it into a linebreak. If you want the latter, change the middle regexp to s/<br>/\n/ig

edit: fusetalk borked it up, give me a sec to fix

ok, remove all of the capital X's in this, and that should give you the unborked regexp: (i went a little overboard, just trying to be safe)

perl -pe 's,<(/?[ib])>,X[X$X1X],ig; s/X<XbXrX>X//ig; s,<a\s+href="(.*?)">(.*?)</a>,\X[XlX=X$X2X]X$X1X\X[X/XlX],ig;'
 
Originally posted by: BingBongWongFooey
Pipe through:

perl -pe 's,<(/?[ib])>,[$1],ig; s/<br>//ig; s,<a\s+href="(.*?)">(.*?)</a>,\$2,ig;'

Seems to work.

I'm not sure if you want to turn <br> into nothing (since your html probably already has a line break there), or if you want to turn it into a linebreak. If you want the latter, change the middle regexp to s/<br>/\n/ig

edit: fusetalk borked it up, give me a sec to fix

ok, remove all of the capital X's in this, and that should give you the unborked regexp: (i went a little overboard, just trying to be safe)

perl -pe 's,<(/?[ib])>,X[X$X1X],ig; s/X<XbXrX>X//ig; s,<a\s+href="(.*?)">(.*?)</a>,\X[XlX=X$X2X]X$X1X\X[X/XlX],ig;'

Cool. I'll look at it when I get home. Thanks! 🙂
 
I want to include some mount options, and recommendations on what directories should be seperate partitions, but here's the first very rough draft of a hierarchy explanation. Tips? Comments? What else did I forget?

The unix filesystem hierarchy is a standard that differs between versions. Linux distributions confuse the situation even more. There are several parts of

the filesystem that are more standard than others. This document will cover the basics, and try to be as system independant as possible. If avabilable,

review hier(7).

/ - root. This is the base of the system's hierarchy. It's the trunk of the tree that every directory branches out of. Very little should be in

the / directory, generally just a kernel. In Linux, the kernel is typically installed in /boot. In Solaris, the kernel is installed in /kernel(?).

/bin - /bin contains many of the executable binaries necessary for single and multiuser operation. On some systems these executables are statically

linked, but dynamic binaries are seen more and more.

/dev - /dev contains the block and character device files. Files in /dev will be used when accessing raw hard drives or the cdrom.

/etc - /etc is where most configuration files are stored. On some platforms, select configuration files may not be stored here because of chroot

issues (Apache is chrooted on OpenBSD). Often times directories are created to contain the configuration files for a particular piece of software. For

example, OpenSSH keeps its configuration files in /etc/ssh instead of just /etc.

/home - /home is where the heart is.

/mnt - This is typically used to mount removable media, or temporary filesystems.

/sbin - The system and administrator binaries necessary for single and multiuser operation are stored here. These executables are generally

statically compiled.

/tmp - Many temporary files make their homes here. This directory is typically world writable, and files in /tmp are not usually preserved across a

system reboot.

/usr - Most of the machine independant files are stored under /usr. Most of the executables users will use and other files will be in this tree.

Many Linux distributions install 3rd party applications into /usr/, as it considers them part of the base system. OpenBSD installs packages to /usr/local/.

Most 3rd party Solaris packages place the files in /usr/local/.

/usr/bin - /usr/bin contains many of the programs that will be used by a user in normal day to day operations.

/usr/sbin - /usr/sbin contains system daemons and utilities that may be executed by a user.

/usr/lib - The standard C libraries live in /usr/lib. Other libraries shipped with the OS may also be installed here.

/usr/include - The standard C include files are typically placed here. Other include files may also be in /usr/include.

/usr/X11R6 - The X window system lives in this directory. Everything necessary for the most basic of X installs will be located here, except for

configuration files which should live in /etc/X11.

/usr/local - /usr/local is a local system containing machine dependant files. Third party software should be installed in /usr/local/. Anything

that is not considered part of the base, and should not be overwritten when an upgrade is performed, should be installed in /usr/local/. /usr/local's

layout mirrors /usr.

/usr/share - Architecture independant data files XXX.

/var - /var is a multipurpose directory. It holds logs, daemon information, temporary files, print, and mail spools. This is a high-activity area,

and will be read and written to frequently.

/var/empty - sshd and possibly other daemons use this to chroot root privileged processes in privilege seperation scenarios.

/var/tmp - Temporary system files that are preserved across a system reboot.

/var/log - Log files are typically stored here. Some daemons may store their logs in alternate locations.

/var/adm - Solaris keeps most system log information here instead of /var/log.

/var/mail - Email is typically kept in /var/mail, depending on the mailbox format in use.

/var/run - System daemons keep some run time information here. Often times the pid file is stored in /var/run.

/var/spool - Print and mail spools are kept here.

/opt - /opt is a hold over from Sun OS. 3rd party proprietary software (like Oracle) is sometimes installed here. It is not used often in BSD, but

SuSE Linux may use it.

/boot - Linux often keeps the kernel and other boot information here. I believe this is a legacy hack that has continued for reasons of tradition.

When LILO could not boot a kernel past the 1024cylinder mark, a small /boot partition was often made for the kernel so a large / was possible.

/usr/libexec - System daemons and utilities that are executed by other programs are stored here. ftpd, which is typically called by inetd, should be

in this directory. This is a BSDism, and does not appear on Linux or Solaris.

/usr/pkg - NetBSD's pkgsrc installs packages here by default.


Interesting mount options:
Depending on the version of the OS there may be some interesting mount options available. Some are more useful than others, and some are even dangerous

(some of the comments mean less if the system is a boot server):
async - mount the filesystem asyncronously. All IO will be done asyncronously. This should give a perceived speedup of IO operations, but is very

dangerous. Keeping a consistant filesystem structure on the disk after a power outage while the filesystem is mounted async is difficult. Linux

filesystems should handle this a bit better, and async may be default for your OS.
nosuid - Some filesystems do not need suid binaries. There is no need to have a suid binary on /home, so the nosuid option is a way to disallow

this.
noexec - Some filesystems do not need executables, and this option will stop a file from executing.
noatime - This option disabled the access time entry. This will cut down on disk activity, and should be useful for USENET servers and possibly

laptops.
nodev - /dev is where devices should exist, no where else.


Recommended partitions:
For a basic system, a user can get away with a / and a swap partition. Once the user gets a better idea of how the OS uses the various partitions, it will

be easier to break it down to fit the machine. Good partitions to break out of root:
/tmp - this can fill up if the system is very busy, moving it out of / gives extra assurance that it will not cause many problems. Also the nosuid and

nodev options would be a good idea. async and noatime should not cause many problems.
/var - There should be no suid or dev files in /var, so the nosuid and noexec options would be a good idea.
/home - Seperating /home helps ensure an upgrade will not overwrite each user's files. Again, nosuid is a very good option for this partition.
/usr - Unfortunately this part of the system needs suid permissions in most situations. If the system does not get updated often (a server typically does

not get new software installed frequently), mounting /usr as read only is an option. Also, if the package management system uses /usr/ for the base of its

packages, filling up /usr is less dangerous if it is seperated from /.
/usr/local - Same as above if the package management software installs packages here. Depending on the software in use, nosuid may be an option.

EDIT: Some of BBWF's comments and suggestions have been integrated. Basic mount options are there, and the beginning of a recommendation for non-root filesystems is taking shape. Do I want to go into any of the differences between say XFS and FFS?
 
some suggestions:

/bin ... Executables in this directory are generally statically compiled.
I don't think they are on linux, generally. Most things in my /bin that aren't dynamic executables (all 10-15 of them) seem to be wrapper shell scripts, i.e. things like egrep, zmore, etc. Same seems to apply to my /sbin.

Regarding /usr, it holds lots of stuff besides binaries. It's for any stuff that can be shared between multiple machines.

Linux generally doesn't have any libexec directories.

/usr/local could be described as a local, i.e. machine-specific version of what /usr is. There are most of the same subdirs like bin, lib, include, share, etc. Stuff in /usr/local is guaranteed to be untouched by the OS. Linux generally views the package manager as part of the OS, BSD views it as seperate, putting installed packages in other places like /usr/local or /usr/pkg.

I think the main thing with var is that it holds data that will be written to and read from a lot. It's a high-activity place. The "var" supposedly means that the files there may "vary" in size, like logs.

I think Suse uses /opt a lot.
 
Originally posted by: BingBongWongFooey
some suggestions:

/bin ... Executables in this directory are generally statically compiled.
I don't think they are on linux, generally. Most things in my /bin that aren't dynamic executables (all 10-15 of them) seem to be wrapper shell scripts, i.e. things like egrep, zmore, etc. Same seems to apply to my /sbin.

That's icky. I'll take a look at a Linux system or two and see how they do it. Modify as necessary. 😛

Regarding /usr, it holds lots of stuff besides binaries. It's for any stuff that can be shared between multiple machines.

Good points, I'll work on it. This is seriously like 5 minutes of actual typing. 😛

Linux generally doesn't have any libexec directories.

Nor does Solaris. It will be modified accordingly.

/usr/local could be described as a local, i.e. machine-specific version of what /usr is. There are most of the same subdirs like bin, lib, include, share, etc. Stuff in /usr/local is guaranteed to be untouched by the OS. Linux generally views the package manager as part of the OS, BSD views it as seperate, putting installed packages in other places like /usr/local or /usr/pkg.

I started working on the /usr/local entry. It needs work, and this is some stuff that should probably be in the entry.

I think the main thing with var is that it holds data that will be written to and read from a lot. It's a high-activity place. The "var" supposedly means that the files there may "vary" in size, like logs.

I think Suse uses /opt a lot.

That's icky too. If a SuSE user confirms it, it will be mentioned. Solaris still uses it a bit, but I don't remember much more than Oracle putting anything there.
 
Fixed it up a bit, added some more info, and edited the last post. Still more work to be done, but I'll hopefully be going home soon. And I don't know if I'll want to work on it there or not. 😛
 
I think "watch" may be a worthwhile command to mention.
Granted, as far as I know, it's not included in anything but Linux distros, but it can be very handy.

For those that are unfamiliar with watch, you type "watch <something>" where something is a command, and watch will run that command every x seconds and display the output on screen.
Say you wanna watch the contents of a directory, you'd just type "watch ls" and it will show you the ls output and refresh every 2 seconds(the default, can be changed with -n x, where is the number of seconds between updates).
 
Back
Top