Results 1 to 9 of 9

Thread: Learning the BASH Shell and I am totally confused. ( Basic help needed )

  1. #1
    Join Date
    Apr 2020
    Beans
    2

    Learning the BASH Shell and I am totally confused. ( Basic help needed )

    Hi Everyone, I am reading a book about the bash shell as I have been told that it is a really powerful thing to know.
    I have a few questions, is there a command that I can type that will show me all the utilities installed that I can use?
    I want to know this so I can read the 'man' files and find out what they do. I am having trouble finding such basic things as a text editor that I can use within the terminal.

    Any help is greatly appreciated.

    Roman

  2. #2
    Join Date
    Jan 2006
    Location
    Sunny Southend-on-Sea
    Beans
    8,430
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: Learning the BASH Shell and I am totally confused. ( Basic help needed )

    You can use
    Code:
    man -k <thing you're interested in>
    to find the man pages about <thing you're interested in>.

    Nano is an easy to use command line text editor that's included in Ubuntu by default.

  3. #3
    Join Date
    Aug 2011
    Location
    52.5° N 6.4° E
    Beans
    6,806
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Learning the BASH Shell and I am totally confused. ( Basic help needed )

    A list of all utilities you can run from your shell isn't very useful, but if you want, this command will show the list (more or less):
    Code:
    ls $(echo $PATH | tr ':' ' ')
    Basically, every file in one of the directories in your PATH is a command you can run in the shell.

    man pages are very useful. nano is an easy to use text editor for in your terminal. There are more sophisticated text editors, harder to use, but you may want to try one someday.

  4. #4
    Join Date
    Nov 2009
    Beans
    Hidden!
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: Learning the BASH Shell and I am totally confused. ( Basic help needed )

    Quote Originally Posted by Roman_Van_Holdt View Post
    Hi Everyone, I am reading a book about the bash shell as I have been told that it is a really powerful thing to know.
    won't make you a wizzard, but might make people think that you are.

    anyway, the free (in PDF) book called The Linux command line is where i started: http://linuxcommand.org/tlcl.php
    Read the easy to understand, lots of pics Ubuntu manual.
    Do i need antivirus/firewall in linux?
    Full disk backup (newer kernel -> suitable for newer PC): Clonezilla
    User friendly full disk backup: Rescuezilla

  5. #5
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    7,699

    Re: Learning the BASH Shell and I am totally confused. ( Basic help needed )

    Quote Originally Posted by mastablasta View Post
    anyway, the free (in PDF) book called The Linux command line is where i started: http://linuxcommand.org/tlcl.php
    +1 for that book. But don't let it get you down or put you off. There is a hell of a lot in it, most of which I don't know even after using a Linux desktop for all of this century. It's a very good reference though.

    So don't try to learn it all because your head will explode and you'll have sticky bits all over the walls. Read bits that interest you, and to perhaps just get a feel for what kind of things can be done. And as a reference when you are not sure how to do something. You will eventually figure out what is worth learning because you use it frequently, what is worth remembering can be done but you need to look up the details, and probably find stuff that you don't think you will ever want.

    P.S.
    Incidentally, for your original request for a list of all possible commands, this will list them and tell you where they are located. Take my word for it, you don't need to know them all although figuring out how that command works would be a good puzzle to start with:
    Code:
    ls $(echo $PATH | tr : ' ')
    Last edited by The Cog; April 9th, 2020 at 01:05 PM. Reason: P.S.

  6. #6
    Join Date
    Dec 2014
    Beans
    2,566

    Re: Learning the BASH Shell and I am totally confused. ( Basic help needed )

    Another very useful tool is 'apropos'. It will search the one line description at the beginning of man-pages for keywords given as parameters. See 'man apropos' for various ways to make the search more precise.

    By the way, the list generated by 'ls $(echo $PATH|tr : ' ')' is of course nowhere near complete since there are three kinds of things you can call from the shell that are not files on the path (shell built-in commands, aliases and functions). You can get a list of the built-in commands with 'help', a list of aliases with 'alias -p' and a list of function with 'declare -F -p' (use -f instead of -F to get full definitions of the functions; careful, this will get very long).

    Holger

  7. #7
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Learning the BASH Shell and I am totally confused. ( Basic help needed )

    I like apropos as well. Here, for instance, is the list produced by "apropos video".

    Code:
    $ apropos video
    amdgpu (4)           - AMD RADEON GPU video driver
    ati (4)              - ATI video driver
    dvdunauthor (1)      - Decodes DVD-Video file structure
    dvgrab (1)           - Capture DV or MPEG-2 Transport Stream (HDV) video and audio data from FireWire
    fbdev (4)            - video driver for framebuffer device
    ffmpeg (1)           - ffmpeg video converter
    ffmpeg-all (1)       - ffmpeg video converter
    ffmpeg-scaler (1)    - FFmpeg video scaling and pixel format converter
    kdenlive (1)         - An open source non-linear video editor.
    melt (1)             - author, play, and encode multitrack audio/video compositions
    modesetting (4)      - video driver for framebuffer device
    mpeg2desc (1)        - multiplex audio/video streams
    nouveau (4)          - NVIDIA video driver
    radeon (4)           - ATI/AMD RADEON video driver
    vesa (4)             - Generic VESA video driver
    video_format (7)     - Proposal For A Video Format Preference Specification
    vmware (4)           - VMware SVGA video driver
    xvidtune (1)         - video mode tuner for Xorg
    xvinfo (1)           - Print out X-Video extension adaptor information
    youtube-dl (1)       - download videos from youtube.com or other video platforms
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  8. #8
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Learning the BASH Shell and I am totally confused. ( Basic help needed )

    apropos and man -k are the same.
    Code:
    $ apropos meld
    meld (1)             - Visual diff and merge tool for the GNOME Desktop
    $ man -k meld
    meld (1)             - Visual diff and merge tool for the GNOME Desktop
    The Linux Documentation Project is full of guides.
    Beginning Bash Scripting
    Advanced Bash Scripting
    Google finds those easily.
    Books from 20 yrs ago are still mostly relevant too, so if you can find a _Unix Power Tools_ book from 1995, there is much to be learned. Same for any Shell scripting books. Don't get too concerned about Ubuntu vs Linux vs Unix. For 90% of scripting, they are the same.

  9. #9
    Join Date
    Apr 2020
    Beans
    2

    Re: Learning the BASH Shell and I am totally confused. ( Basic help needed )

    Hi, thanks for all your advice. I will try all of these and no doubt come back with more questions.
    Have a great weekend.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •