Learn to do without the graphical environment

Hi, the first thing is to say that I am a fan of the terminal (console, shell, bash) and that is why I really do not understand the fact that many users have a hard time adapting to it.
Well in this I want to leave you the commands that can be used to do things we do on a day-to-day basis. Activities such as mounting an ISO image or creating an image from a CD / DVD, listening to music, working on images, etc.
In other words, it can be said with total security that we can do without the graphical environment : )

Any doubt or question, complaint or suggestion regarding any of these commands (or any other that does not appear here) tell me. Without more ...

There I leave an index or list of what is in this post:

  • - »How to create link between files
  • - »How to create link between folders
  • - »Create an image of a CD / DVD
  • - »Check the UUID of some partition
  • - »Mount and unmount an ISO from one folder to another folder
  • - »To check the data on a CD / DVD
  • - »Searching for files
  • - »Know the type of a file
  • - »Completely delete a folder
  • - »Completely delete a type of files within a folder
  • - »Chop or split files
  • - »Join divided files with split
  • - »To change screen resolution and refresh time
  • - »Take a screenshot or screenshot
  • - »Convert images from one format to another
  • - »Change dimensions of an image
  • - »Convert an image from colors to black and white
  • - »Create an animated gif with several images
  • - »Extract the audio from a video
  • - »Convert an MPEG file to an AVI
  • - »To turn off the PC
  • - »To turn off the PC after a certain time
  • - »To turn off the PC at a specific time
  • - »To restart the PC
  • - »To restart the PC after a certain time
  • - »To restart the PC at a specific time
  • - »Using the calculator.
  • - »Shows the properties and characteristics of an image.
  • - »How to configure the network.
  • - »Check your email.
  • -" Surfing the Internet.
  • - »Compress and decompress all types of files.

_________________________________________________________________________________
Create links between files:
kzkggaara @ geass: ~ $ ln -s / "file-address" / "address-where-we-will-put-the-link"/
Example: ln -s /etc/apt/sources.list / home / kzkggaara / Scripts /
_________________________________________________________________________________
Create links between folders:
kzkggaara @ geass: ~ $ ln -s / "folder-address" / / "address-where-we-will-put-the-link" /
Example: ln -s / var / www / / home / kzkggaara / Hosted /
_________________________________________________________________________________
Create a virtual image of a CD / DVD:
kzkggaara @ geass: ~ $ dd if = / dev / cdrom of = / home / your_user / name.iso
That is what they have to write, of course ... we must substitute "your user”By the name of your user (in my case "kzkggaara") and "name”By whatever name you want the image to have.
Example: dd if = / dev / cdrom of = / home / kzkggaara / Distros / archlinux-2011-05.iso
_________________________________________________________________________________
Check the UUID of some partition:
kzkggaara @ geass: ~ $ vol_id -u / dev / "partition-to-check"
Example: vol_id -u / dev / sda3
_________________________________________________________________________________
Mount and unmount an ISO image from one folder to another folder:
kzkggaara @ geass: ~ $ sudo mount -t iso9660 -o loop / "iso-file-address" / "folder-where-you-want-iso-content-to-mount"
Example: sudo mount -t iso9660 -o loop / home / kzkggaara / Downloads /archlinux-2011-05.iso / average / temp
Note: It is necessary to enter our root password since administrative permissions are required. I also emphasize the spaces between the address or path of the ISO file and the address or path of the folder where it will be mounted.
To disassemble: sudo umount / "Folder-where-I-mount-iso-content-"
Example: sudo umount / average / temp
_________________________________________________________________________________
To check the data on a CD / DVD:
kzkggaara @ geass: ~ $ cdck -d / dev / "device-to-check"
Example: cdck -d / dev / cdrom1
_________________________________________________________________________________
Searching for files:
kzkggaara @ geass: ~ $ find / "path-where-to-search" -name *. "extension-of-files-we-want-to-search" -print
Example: find / home / kzkggaara / Projects / MCAnime -name * .xcf -print
Note: If instead of putting "-yam"We put"-bow downThen the search would be case-insensitive.
_________________________________________________________________________________
Know file type:
This command will help us to know what type of file is the one we select. It is quite simple but it can be very useful to us from time to time.
kzkggaara @ geass: ~ $ file / "file-address"
Example: file / home / kzkggaara / Downloads /avatar.png
_________________________________________________________________________________
Completely delete a folder:
This helps us to delete a folder or directory along with all the files and subdirectories it contains.
kzkggaara @ geass: ~ $ rm -r / "folder-address"
Example: rm -r / home / kzkggaara / Work / squid-logs76 /
Note: This command does not send the folder or its contents to the Trash, this deletes it completely. And also, depending on what you want to delete, they will need or not administrative permissions (if they are going to delete something within their own personal folder there should be no problem).
_________________________________________________________________________________
Completely delete one type of files within a folder:
This helps us to delete a type of files within a folder or directory.
kzkggaara @ geass: ~ $ rm *. "file-type-extension-you-want-to-delete" / "address-of-the-folder-to-check"
Example: rm * .jpg / home / kzkggaara / Downloads /
Note: This command does not send the folder or its contents to the Trash, this deletes it completely. And also, depending on what you want to delete, they will need or not administrative permissions (if they are going to delete something within their own personal folder there should be no problem).
_________________________________________________________________________________
Chop or split files:
This helps us to divide a file into a size defined by us.
kzkggaara @ geass: ~ $ split -b "whatever-size-we-want" k / "address-of-the-folder-to-check" «name-of-the-parts-of-the-file »
Example: split -b 40k /home/kzkggaara/Documentos/test.odt test1.odt
Note: The size is given in KB by default, if you want it to be in MB instead of KB then just change the "k" by a "m".
_________________________________________________________________________________
Join split files with split:
This helps us to join the files previously divided with the split command.
kzkggaara @ geass: ~ $ cat "Name-of-the-parts-of-the-file"*> / "Address-of-the-folder-where-we-will-put-file-once-joined"/
Example: cat test1 * /home/kzkggaara/test.odt
_________________________________________________________________________________
To change screen resolution and refresh time:
This, as it says above, helps us to change the screen resolution and refresh time (hertz) but first it is necessary to check what screen resolutions our PC supports:
kzkggaara @ geass: ~ $ sudo xrandr -q
After checking that the resolution we want is supported, we proceed to change it using the following command:
kzkggaara @ geass: ~ $ sudo xrandr -s "desired-resolution" -r "desired-refresh-time"
Example: sudo xrandr -s 1280 × 1024 -r 70
Note: To use this command it is obvious that it is necessary to have a desktop environment installed, since otherwise we would change the resolution? to the terminal ?? LOL. To know more about it, here we publish a specific article about this.
_________________________________________________________________________________
Take a screenshot or screenshot:
With this I show you how to make a screenshot of our desktop, how instead of doing it to our desktop completely we can do it to a window, how to save it etc etc ...
But first we must install a small 4MB package called imagemagick which we can find both in the Ubuntu repos and in those of Debian and derivatives. After having it installed ...
To capture the desktop instantly:
kzkggaara @ geass: ~ $ import -window root / "Where-do-you-want-to-save-the-capture"
- » Example: import -window root /home/kzkggaara/screenshot.jpg
To capture the desktop after a while:
kzkggaara @ geass: ~ $ sleep "number-of-seconds" s; import -window root / –Where-they-want-to-save-the-capture–
- » Example: sleep 5s; import -window root /home/kzkggaara/window.jpg // The capture will take place after 5 seconds.
_________________________________________________________________________________
Convert images from one format to another:
kzkggaara @ geass: ~ $ convert /"Image-you-want-to-convert" / «Image-that-will-be-created-after-converting-the-previous one»
Example: convert /home/kzkggaara/Downloads/render.png /home/kzkggaara/Downloads/render.jpg
_________________________________________________________________________________
Change dimensions of an image:
This helps us to enlarge or reduce the size of an image, and this can help us to reduce its weight.
kzkggaara @ geass: ~ $ convert -sample "desired-dimensions" /«Original-image» / «Image-that-will-be-created-after-working-the-previous»
Example: convert -sample 800 × 600 /home/kzkggaara/screenshot.jpg /home/kzkggaara/modified-screenshot.jpg
_________________________________________________________________________________
Convert a colored image to black and white:
kzkggaara @ geass: ~ $ convert-sample /«Original-image» -monochrome / «Image-that-will-be-created-after-working-the-previous»
Example: convert /home/kzkggaara/picture.jpg -monochrome /home/kzkggaara/picture_modified.jpg
_________________________________________________________________________________
Create an animated gif with multiple images:
This is a command that I just learned just a few minutes ago haha, with this command we can create an animated image (gif) using frames to many other images ... it's really fast, easy and best of all, we don't have to open Gimp nothing like it to do it haha.
kzkggaara @ geass: ~ $ convert -delay "time-between-frame-and-frame" "image # 1" «Image # 2» «image # 3 »«image # 4 » (... and as many as they want) "Gif-name" .gif
Example: convert -delay 300 userbar1.jpg userbar2.jpg userbar3.jpg userbar4.jpg userbarkzkg.gif
Note: The time between frame and frame (image and image) is in milliseconds, so 100 = 1 second, 200 = 2 seconds, 300 = 3 seconds, 400 = 4 seconds, etc. etc. etc.
_________________________________________________________________________________
Extract the audio from a video:
This is another command that surprised me when I found it, haha ​​I no longer need any software to extract the audio because with this it can be extracted easily, there is also the advantage that the more codecs you have installed then there will be no video file at the which you cannot extract the audio from. To make it work you need to have the package installed mplayer and all the dependencies it needs.
kzkggaara @ geass: ~ $ mplayer -vo null -dumpaudio -dumpfile / "audio-file-to-be-extracted" / «Video-from-which-you-get-the-audio».avi
Example: mplayer -vo null -dumpaudio -dumpfile /home/kzkggaara/test.mp3 /home/kzkggaara/Videos/Anime/project.avi
_________________________________________________________________________________
Convert an MPEG file to an AVI:
I put this rather in case someone needs it because to tell the truth I am not very good at converting videos from one format to another, so I do not know very well the advantages of using one or another encoding system, etc. For it to work you need to have the package installed mplayer and all the dependencies it needs.
kzkggaara @ geass: ~ $ mencoder / "video-to-convert" -ovc lavc -lavcopts vcodec = mpeg4: vpass = 1 -oac copy -o / "video-convert"
Example: mencoder /home/kzkggaara/Downloads/kitty.mpg -ovc lavc -lavcopts vcodec = mpeg4: vpass = 1 -oac copy -o /home/kzkggaara/Downloads/kittyconverted.avi
_________________________________________________________________________________
To shut down the PC:
kzkggaara @ geass: ~ $ sudo shutdown -h now
Note: It is necessary to enter our root password since administrative permissions are required.
_________________________________________________________________________________
To turn off the PC after a specified time:
kzkggaara @ geass: ~ $ sudo shutdown -h + "desired-time"
Must change ""Desired-time"”For the number or number of minutes to wait before shutting down the system.
Example: sudo shutdown -h +10 // The system will shut down 10 minutes after entering this command line.
Note: It is necessary to enter our root password since administrative permissions are required.
_________________________________________________________________________________
To turn off the PC at a specific time:
kzkggaara @ geass: ~ $ sudo shutdown -h "desired-time"
Must change ""Desired-time"”By logically the time they want the system to turn off. Clock in 24 hour format, that is; from 0 to 23.
Example: sudo shutdown -h 22:30 // The system will turn off at 22:30 p.m., that is; at 10:XNUMX at night.
Note: It is necessary to enter our root password since administrative permissions are required.
_________________________________________________________________________________
To restart the PC:
kzkggaara @ geass: ~ $ sudo shutdown -r now
kzkggaara @ geass: ~ $ sudo reboot
Note: It is necessary to enter our root password as administrative permissions are required. Also, either of the two previous lines do the same; restart the PC.
_________________________________________________________________________________
To restart the PC after a certain time:
kzkggaara @ geass: ~ $ sudo shutdown -r +"Desired-time"
Must change ""Desired-time"”For the number or amount of minutes to wait before restarting the system.
Example: sudo shutdown -r +10 // The system will reboot 10 minutes after entering this command line.
Note: It is necessary to enter our root password since administrative permissions are required.
_________________________________________________________________________________
To restart the PC at a specific time:
kzkggaara @ geass: ~ $ sudo shutdown -r "Desired-time"
Must change ""Desired-time"”By logically the time they want the system to restart. Clock in 24 hour format, that is; from 0 to 23.
Example: sudo shutdown -r 22:30 // The system will restart at 22:30 p.m., that is; at 10:XNUMX at night.
Note: It is necessary to enter our root password since administrative permissions are required.
_________________________________________________________________________________<Span
Using the calculator:
Suppose we want to make a calculation too complicated to do it mentally, or we just don't feel like thinking hahaha, the solution to this would be "bc"
kzkggaara @ geass: ~ $ bc
After writing that simple command, we can write the calculation we want to do:
Example: 1 + 49 / 25
And when pressing [enter] the desired result will not appear. To exit the calculator we just put quit.
_________________________________________________________________________________
Shows the properties and characteristics of an image:
This command will tell us exactly various values ​​of an image, such as its extension, size, etc.
kzkggaara @ geass: ~ $ identify "image"
Example: identify /home/kzkggaara/banner.png
_________________________________________________________________________________
How to configure the network:
These commands that I leave below I use a lot to configure the network in servers and virtual network cards.
To change the IP address we put:
kzkggaara @ mail-server: ~ $ ifconfig ethx XXXX
Example: ifconfig eth0 192.168.191.1
Note: eth0 is the default network card (of the board) but if you have any other network card then it would be eth1.
To change the netmask:
kzkggaara @ mail-server: ~ $ ifconfig netmask XXXX
To change the broadcast address:
kzkggaara @ mail-server: ~ $ ifconfig broadcast XXXX
_________________________________________________________________________________
Check your email:
This despite the fact that the way it is shown is not very "pretty", it is useful since we save having to configure an email manager.
The first thing we have to do is connect to the server through TELNET:
kzkggaara @ mail-server: ~ $ telnet «server» 110
Example: telnet mail.interaudit.cu 110
Note: Port 110 is the POP3 access port.
The second thing is that we will see a welcome message from the server, now what follows is to log in to our user:
user "our-user"
Example: user kzkggaara
The third thing is to put the password to complete the login:
pass “password”
Example: penguin pass
And ready we are already logged in, there it will tell us how many emails we have, I leave the necessary commands:
list: returns the list of messages and what each one occupies in bytes.
stats: tells us how many messages we have and how many bytes they occupy, in total
retr "mail ID": Show the email corresponding to the ID you entered.
give "mail ID": Delete the email corresponding to the ID you entered.
rset: Retrieve a message that we have marked for deletion with dele, before closing the session.
_________________________________________________________________________________
Surfing the Internet:
Here I leave one of the many ways that there are to surf the internet from the console or terminal. This can be done since we will install a browser that works without X server, in this case we will use left2 but there are many others.
To install it we just put:
kzkggaara @ geass: ~ $ sudo apt-get install links2 (in case of using distros based on Debian)
And voila, now all that remains is to access a website:
kzkggaara @ geass: ~ $ links2 “website”
Example: links2 www.mcanime.net
And although it looks something different from how we are used to seeing it, it does help us to visit some site or find some information quickly. It is good to note that it will not load CSS or images or java scripts haha. Below I leave the shorcuts:

ESC : Show Menu
^ C, q : Remove
^ P, ^ N : Slide up, slide down.
(,) : Swipe left, right, up, down, select link.
-> : Follow link.
<- : Go back.
g : Go to URL.
G : Go to URL based on current URL.
/ : Look for.
? : Search back.
n : Find next.
N : Search previous.
= : Document information.
\ : Document source code:
d : To download.

Compress and decompress all types of files:
In order not to make this post much longer, I only leave the link to the article that we published talking about this: With the terminal: Compress and decompress files


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Eugenia bahit said

    Excellent article! I share it 🙂

      1.    KZKG ^ Gaara <° Linux said

        I passed and saw it, thank you very much indeed *-*
        If I could help you in any way, here we are 😀

        regards

        1.    Eugenia bahit said

          Articles like these YA help a lot to spread knowledge, free technologies and above all, encourage users to "lose their fear" of SL SL
          These are contributions that are really worth it.

          Regards!!

          1.    KZKG ^ Gaara <° Linux said

            Thanks, I'll try to put more articles like these, trying to be a little more technical 😉… in fact, I just put another one on SSH and you may find it interesting 😀

            Greetings and a pleasure to have you here 😉

          2.    kdpv182 said

            I see that you are an architect and you use gnu-linux =), how do you manage to develop in your profession with Linux? Your opinion seems interesting to me since most related careers prefer commercial software.

      2.    elav <° Linux said

        Thanks ^^

        1.    Courage said

          It's on the other side of the screen.

          If I know that you do the good guys hahahahaha

    1.    elav <° Linux said

      Thank you. I'm looking forward to Tuesday as a good thing 😀

    2.    KZKG ^ Gaara <° Linux said

      An honor that you do me 😉
      Thank you very much, really ... thank you 😀

      PS: elav, is it time you did an article on Mutt or not? 😉

    3.    Patricio morales said

      Interesting post:

      -Many of these topics remind me of several years ago when I still did not have a personal computer to be able to dabble in Linux and it did not even occur to me that I was going to dedicate myself to computing, and I was already beginning to venture into the world Unix, and the command console, through grex's shell account services via telnet (now they still offer the services but with ssh): Viewing and sending email with pine, I was introduced to the then fascinating world of BBS (Bulletin Board System ), learn Unix commands, compile C programs, use the Lynx browser, etc.

      -Today there are very user-friendly graphical environments (and thanks to that in part Linux has become popular). I have gone through NCR's Unix MP-RAS, Red Hat 9.0, Mandriva 2007, OpenSuse 11.0, now Ubuntu 10.04 and for more than There are beautiful graphical environments, and even administration systems like WEBMIN (which make it easy for the System Administrator at the cost of security), there is nothing that beats the power that resides behind the command line.

      Greetings.

      1.    KZKG ^ Gaara <"Linux said

        Thank you and WELCOME to our humble site 🙂
        I agree with you on everything, no matter how simple the system can be done using GUI, it will definitely be achieved more simply using the terminal, I myself have been able to verify that with simple commands or scripts in bash it is possible to perform tasks more quickly and with some tips, it is possible to optimize and automate the process.

        Users who are not interested in knowing the operation of their OS, there they have multiple desktop environments to choose from, they will be able to manage their OS without major problems, and those who are interested in knowing the honeys of the OS, there is a lot of documentation about it, it is only question of having motivation.

        Webmin? ... if you ask me to give it a rating between 0 and 10 I would give it: / dev / null ... I don't even install it dead.

        Greetings and really, a pleasure to read your comment, thank you very much for stopping by and commenting.
        We read each other here 🙂

  2.   Courage said

    Navigating the terminal seems interesting to me, what I don't know is how you are able to live without a graphical environment no matter how much KDE you have

    1.    Courage said

      Do you already have access to .com? gave it for the comment above and open that Debian vs Arch and have a site for the eternal battle haha

      1.    KZKG ^ Gaara <° Linux said

        I have access to several .COMs, (Artescritorio, Blogspot blogs, etc), but not all ... for example, I no longer have access to WP.com 🙁

  3.   Edward2 said

    Good article, I like this type of article. <° Linux 😀

    1.    KZKG ^ Gaara <° Linux said

      Ah, these yes no? HAHA… to see if when I put more technical articles, to see if you can understand them LOL !!!!

      PS: I always wake up with Troll Mode ON, I just know how to control it 😀

  4.   Thirteen said

    Very Good the post. I'm going to try several of those instructions in the terminal and see how it goes.

    Greetings.

    1.    KZKG ^ Gaara <° Linux said

      Ok okay, if you have a problem or something strange, tell me and I will help you with pleasure 😉
      regards

  5.   fredy said

    thanks very good help.

    1.    KZKG ^ Gaara <° Linux said

      For nothing, a pleasure to help 😀

  6.   The brown said

    Thanks for the info it's great 😀

    1.    KZKG ^ Gaara <° Linux said

      Thanks

  7.   Jorge Eduardo Olaya said

    great to be able to execute all these commands, eliminating these tasks in graphical mode, I'm going to start practicing little by little

  8.   Antonio said

    Great ... for those who are starting to be linuxers !!
    regards

  9.   Juan Manuel said

    This article is a half court goal.
    Excellent.

    1.    KZKG ^ Gaara <° Linux said

      Thank you
      Welcome to our site 😉

  10.   Ellery said

    We also have facebook and twitter from the terminal =). Annex the links

    Facebook
    http://fbcmd.dtompkins.com/
    Twitter
    https://github.com/jgoerzen/twidge/wiki.

    Greetings and thanks for sharing.

  11.   Athal wolf said

    Hello KZKG.
    Excellent information that you give. I am getting started in Linux, I would like to consult you on how to learn and master Linux. Is it possible for you to guide me?
    Greetings and thanks.

    1.    KZKG ^ Gaara <"Linux said

      Hello and welcome Athal : )
      Sure, here we are for what you need ... you can write me directly to my email (kzkggaara@myopera.com) or use our forum: http://foro.desdelinux.net . Any way you want we will be there 😀

      Greetings and welcome friend.

  12.   kondur05 said

    This is what I meant thanks kage

    1.    KZKG ^ Gaara said

      Nothing, a pleasure friend 😀

  13.   gijagu said

    Excellent information, thank you very much friend !!!!! Greetings = D where do I get more of those commands?

  14.   molocize said

    As always, excellent KZKG ^ Gaara and I see that you have returned to Arch, a great contribution

    1.    KZKG ^ Gaara said

      Back to Arch? actually nope, I'm still using Debian :)

  15.   Matias (@ W4t145) said

    Excellent contribution, to favorites and shared

    1.    KZKG ^ Gaara said

      Thank you

  16.   Pako Guerra Gonzalezp said

    Great article, I'll take some and let me share your article

    1.    KZKG ^ Gaara said

      Thank you ^ - ^
      Any help you can provide to bring the content to other users, we will appreciate it 😀

      Greetings and welcome to the blog 😉

  17.   lucasmatias said

    Terrific, I'm already holding hands to links2

  18.   Ernesto Moreno said

    Excellent Post! this helps me a lot to expand my knowledge of the GNU / Linux world.

    Greetings and follow these great posts!

  19.   Rolando ER said

    I know that I am arriving a little late and maybe it has already been said, but I would like to add that instead of the calculator it is also very cool to use the Python interpreter. Simply type 'python' and you can perform all kinds of calculations, you can also save variables (expression: "a = 5") until you exit the session ("quit ()").

  20.   dmnemy said

    Hello, I am very interested in this page, but I have a hard time using Linux. I have Arch installed and now it happens to me that in Dolphin it does not show me the device connected to the USB due to an error that I had removing the memory card from the reader. Although I can see the information contained in the pen drive, I cannot view it directly in Dolphin and when I open the device, the «root» sector is marked, but if I leave there and click on root, only what is contained appears in that sector, I don't know if I explain myself. Thanks in advance if you can help me because I am new to this.

  21.   Diego Leon Giraldo said

    very good article, but can you tell me how I activate a network card in kali linux? (wireless). the commands that I have consulted have not helped me. are you still posting? I want to master linux, which version do you recommend to be able to tinker it a lot and know how to configure everything. from the network to a server. I have information but I want to organize it or something that I can learn and level up.
    Greetings and thanks.
    Diego

  22.   Jose said

    Very solprendente your work, Emberdad you know what you do !!!!!!

  23.   kiara said

    Hello, I have always been told that installing a server without the graphical environment is the best, and I have always done it but they never tell me what advantages this has.

    Can someone point me out?

    Greetings.