[SOLVED] recommend easy tasks after learning basic command line
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
recommend easy tasks after learning basic command line
If this is in the wrong forum please advise and I will change it.
I am just learning some of the basic Command Line instructions cd, ls etc. I was wondering if there any exercise that exist where one can link a few of these instructions together to do work on my own PC or to achieve some task - preferably progressing at a steady pace. I think I learn quicker if there is some outcome rather than just entering cd and seeing the directory change. I hope people know what I am trying to achieve - I couldn't find much on a quick search.
Let me offer the Debian Administrator's handbook as a Use-it-when-ya-think-of-it method to acquire more experience.
You can even install it.
I have, (as do quite a few of us here) collections of such resources) It all depends on the task.
If the task is to learn, well there's no end.
What did you have in mind?
Practical exercises are difficult to suppose or assume anymore, so I'm asking.?
https://debian-handbook.info https://cmdchallenge.com
When I was just learning, I lived at CommandLineFu
I wrote shell scripts to "help maintain" the system.
First and foremost, I learned "the shell", bash specifically.
Comfortable with breaking and fixing your own gear, if necessary?
My blog post is littered with such references. Start at "### Beginner User Guides: ###" and the next 2 sections.
In my view the bash shell is good for when you know precisely what you want to do, and when it's something repetitive (so you write a one-liner or a more complex script to automate it). So if you can think of anything like that, that's a good start.
File management is one good use. Copying, renaming, making folders, unzipping, etc. It becomes easy and routine in bash with a bit of practice.
To get into some more advanced bash features, simple image processing is a good use. One time I had a folder about a hundred large print-resolution stock images and needed to scale them down for use on a website. With ImageMagick and a bash for loop, one line of shell code did that for the entire folder.
Some of their stuff is in need of updating, but the books by Machtelt Garrels (particularly BASH Guide for Beginners and Introduction to Linux) are still excellent primers. The command line hasn't changed all that much. The Advanced Bash-Scripting Guide is also worth a look.
I still have a print-out of Introduction to Linux on my bookshelf.
Stuff about system administration, Samba, LDAP, and the like, is likely to be so out of date as to be not much help.
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,491
Rep:
Once proficient at moving around, creating & deleting files, try moving on to some shell scripting, just run two or three simple commands together, put them into a file, & make it executable.
Code:
echo "pwd; ls -lh; free -m; df -h" > info
Code:
chmod +x info
then run your new script by using
Code:
./info
It will print out your present working directory, a listing of all your files, how your ram is being used, how much space you have left.
giving up a graphical filemananager and using the terminal to do anything related to filemanaging will give you a lot of possibilitie to learn quick.
All the rest is only on top of that.
You can also do quite some other daily tasks (well: more or less daily) from the terminal:
feh - for picture viewing
scrot - for taking screenshots
irssi - for irc chat
mocp, xmms2 and much more - for listening to music
abcde - to rip CD's
pacpl - to convert audiofiles
mpv - to watch movies
to mention a few.
Also you might want to learn a decent editor. vim or emacs comes to mind. Mainly that in this section. Really.
Learning a multiplexer like gnu screen or tmux is another long term goodie.
Both won't give advantages immediatly, as the stuff mentioned above, but in the long run.
Learning cool bash (or shell tricks) is also a good idea. You will be very quick. To give an example:
Code:
mkdir /home/user/Tmp/some_stuff/some_more_stuff/new_directory && cd !$
&& will test if the first command succeded.
!$ will expand to the last argument of the former command. It's handy if you got a really long path.
The bad news is that i don't know a good place where to look for such tricks. You will run in them over the years. Idling in the irc channel #bash is an idea, perhaps mywiki.wooledge.org or wiki.bash-hackers.org. The programning subsection of linuxquestions.org (so: here) is also always worth to look at.
Perhaps here: http://forums.debian.net/viewtopic.php?t=29655 If you are planning to do so, make sure to carefully read this (the web is full of weird solutions when it comes to bash): http://mywiki.wooledge.org/BashPitfalls
Thanks for all the helpful advice - certainly plenty to look at and hopefully pick up some tricks. In answer to Habitual above: I am not sure what I am looking for really - I suppose some easy tasks/tricks that provide insights into the process and keep me interested and motivated on learning CL. Then moving onto the more serious and specific tasks that relate to any projects I am doing on my machine. Once again thanks for the above contributions from all - I am sure other newcomers to Bash will also welcome the suggestions.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.