Latest revision |
Your text |
Line 15: |
Line 15: |
| # Click the command button on the main page | | # Click the command button on the main page |
| # Select ‘Utilities’ | | # Select ‘Utilities’ |
- | # Select ‘X Terminal’ | + | # Select ‘X Terminal’ |
| + | # cd fuckoff |
| | | |
| === 770 === | | === 770 === |
Line 28: |
Line 29: |
| | | |
| '''Understand what a command does before you type it''' | | '''Understand what a command does before you type it''' |
- | Fundamentally you should understand what a command does before typing it in and pressing enter. If you have a linux installed on your desktop PC, there you can normally type the command with the parameter <code>--help</code> to get a list of options, i.e. <code>ls --help</code>, or look up manual pages if installed, with the most helpful linux command <code>man</code> for "manual", like: | + | Fundamentally you should understand what a command does before typing it in and pressing enter. If you have a linux desktop distribution, like Ubuntu, you can normally type the command with the parameter <code>--help</code> to get a list of options, i.e. <code>ls --help</code>, or look up manual pages if installed, with: |
| | | |
| man ls [enter] | | man ls [enter] |
| | | |
- | or
| + | to find out what the commands are and their options. However you can't do this on the tablets though as the tablets use cut down embedded commands, (BusyBox - I think?), so look at [http://ss64.com/bash Linux commands] or [http://www.busybox.net/downloads/BusyBox.html Busybox list of Linux commands and options for each one] |
- |
| + | |
- | man man [enter]
| + | |
- | | + | |
- | to find out what a command does and what are and the options it allows. | + | |
- | | + | |
- | However on maemo the default shell is busybox which has lots of commands like <code>ls</code> built in, and most of them are crippled in functionality so don't support a really helpful --help function. Also the <code>man</code> command is not available on standard maemo. So maemo NITs are basically a hostile environment for beginners to learn about linux. | + | |
- | | + | |
- | There are ways to mitigate this:
| + | |
- | * install man. The pkg is available e.g. here:[http://maemo.org/packages/view/man-db-n900/] and also in your application manager when you got the extras-devel catalog enabled.
| + | |
- | * install bash (version 3 or 4), a proper fullsize shell though without many builtins. (http://maemo.org/packages/view/bash3/ http://maemo.org/packages/view/bash4/, again also in your application manager, from extras catalog.
| + | |
- | * install proper original tools to replace the crippled ones of busybox, when you already installed bash. Refer to e.g. [[User:Joerg_rw/tools]]
| + | |
- | | + | |
- | WARNING: You might feel like getting rid of supposedly useless busybox when you did the above suggested installation of bash and tools. ''DO NOT uninstall busybox'', it's needed for maemo bootup!
| + | |
- | | + | |
- | If you're reluctant to do all of the above (installing man package mandb-N900 is strongly recommended anyway), you may look up general linux cmdline help here: [http://ss64.com/bash Linux commands], and details about crippled busybox here: [http://www.busybox.net/downloads/BusyBox.html list of Busybox Linux commands and options for each one]. Man pages online you'll find at [http://manpages.courier-mta.org/manpageindex.html], further links are listed at [http://tldp.org/manpages/man.html].
| + | |
- | | + | |
- | You find more links that give you easy as well as ambitious starts on linux shell here: [http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_01_01.html Bash-Beginners-Guide] [http://tldp.org/LDP/abs/html/why-shell.html "Shell Programming!"] [http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_01_01.html Common shell programs] [http://www.faqs.org/docs/bashman/bashref_toc.html#SEC_Contents Bash reference] [http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html BASH Programming - Introduction HOW-TO] and generally under http://tldp.org/
| + | |
| | | |
| === Basics === | | === Basics === |
- |
| |
- | One of the most useful yet unknown to beginners: <TAB> completes anything at any moment, If there are ambiguities, <TAB> will complete only the unambiguous part. Two times <TAB> shows all alternatives when there are ambiguities.
| |
- |
| |
- | Try <TAB><TAB> on an empty line to get a list of all commands that are "known" to the shell (will not find commands that are not in $PATH and so would need full pathname to invoke them)
| |
| | | |
| ==== Basic commands ==== | | ==== Basic commands ==== |
Line 269: |
Line 249: |
| | | |
| ~ $ df -h | | ~ $ df -h |
- |
| |
- | To show only rootfs partition
| |
- | ~ $ df -h /
| |
| | | |
| === Show a list of installed packages === | | === Show a list of installed packages === |
Line 338: |
Line 315: |
| apt-get update | | apt-get update |
| | | |
- | <s>Upgrade any installed apps with newer versions (the <code>-y</code> is optional and just avoids it prompting you as to whether or not to proceed):
| + | Upgrade any installed apps with newer versions (the <code>-y</code> is optional and just avoids it prompting you as to whether or not to proceed): |
- | apt-get upgrade -y </s> DEPRECATED! | + | apt-get upgrade -y |
| | | |
| Remove any downloaded package archives. Once the package is installed the downloaded file is no longer needed. The Application Manager does this automatically but if you are using "apt-get" you'll have to do it manually: | | Remove any downloaded package archives. Once the package is installed the downloaded file is no longer needed. The Application Manager does this automatically but if you are using "apt-get" you'll have to do it manually: |
Line 347: |
Line 324: |
| apt-get autoclean | | apt-get autoclean |
| | | |
- | <s>Remove any packages which are no longer needed. These are applications/libraries which were automatically installed because of dependencies but are no longer required:
| + | Remove any packages which are no longer needed. These are applications/libraries which were automatically installed because of dependencies but are no longer required: |
| apt-get autoremove | | apt-get autoremove |
- | </s> DEPRECATED! May remove essential pkgs, see http://talk.maemo.org/showthread.php?t=70875
| |
| | | |
| Install any missing dependencies (which should fix the broken packages issue I had): | | Install any missing dependencies (which should fix the broken packages issue I had): |
Line 373: |
Line 349: |
| | | |
| ~ $ dpkg -i nano_2.0.6_armel.deb | | ~ $ dpkg -i nano_2.0.6_armel.deb |
- |
| |
- | To extract the .deb file for any reason
| |
- | ~ $ dpkg -x nano_2.0.6_armel.deb /path/to/extraction/directory
| |
- |
| |
- | To extract the control file from the .deb file
| |
- | ~ $ dpkg-deb -e nano_2.0.6_armel.deb
| |
- | then you will find the control file named as "control" in "/home/user" if you used "sudo gainroot" to gain root access or in "/root" if you used "root" command to gain root access
| |
| | | |
| == Further reading == | | == Further reading == |