Skip to main content

Basic Linux Commands for The Young

Basic linux commands for The Young - Just as when you type a command at the DOS command line or command line in Linux is also typed at the prompt and end enter to execute the command. The command line is a more efficient way to do any work therefore Linux users still rely on this method to work. We recommend that the young should know and at least once used this command line because someday the knowledge of these commands can be very necessary.the basic commands linux system maybe some of you already know, if of you who do not know well in the following basic commands linux is very complete and I collated.

Linux Commands :
  • cat : Sends file contents to standard output. This is a way to list the contents of short files to the screen. It works well with piping. Sends the contents of the ".bashrc" file to the screen. ex: cat .bashrc  
  • cd : Change directory
    - cd /home = Change the current working directory to /home. The '/' indicates relative to root, and no matter what directory you are in when you execute this command, the directory will be changed to "/home".
    - cd httpd = Change the current working directory to httpd, relative to the current location which is "/home". The full path of the new working directory is "/home/httpd".
    - cd .. = Move to the parent directory of the current directory. This command will make the current working directory "/home.
    - cd ~    Move to the user's home directory which is "/home/username". The '~' indicates the users home directory.
  • cp : Copy files
    - cp myfile yourfile = Copy the files "myfile" to the file "yourfile" in the current working directory. This command will create the file "yourfile" if it doesn't exist. It will normally overwrite it without warning if it exists.
    - cp -i myfile yourfile = With the "-i" option, if the file "yourfile" exists, you will be prompted before it is overwritten.
    - cp -i /data/myfile = Copy the file "/data/myfile" to the current working directory and name it "myfile". Prompt before overwriting the file.
    - cp -dpr srcdir destdir = Copy all files from the directory "srcdir" to the directory "destdir" preserving links (-p option), file attributes (-p option), and copy recursively (-r option). With these options, a directory and all it contents can be copied to another directory.
  • dd : Disk Duplicate
    - dd if=/dev/hdb1 of=/backup/ = The man page says this command is to "Convert and copy a file", but although used by more advanced users, it can be a very handy command. The "if" means input file, "of" means output file.
  • df  : Show the amount of disk space used on each mounted filesystem.
  • less   
    - less textfile = Similar to the more command, but the user can page up and down through the file. The example displays the contents of textfile.
  • ln : Creates a symbolic link to a file.
    - ln -s test symlink = Creates a symbolic link named symlink that points to the file test Typing "ls -i test symlink" will show the two files are different with different inodes. Typing "ls -l test symlink" will show that symlink points to the file test.
  • locate : A fast database driven file locator.
    - slocate -u = This command builds the slocate database. It will take several minutes to complete this command. This command must be used before searching for files, however cron runs this command periodically on most systems.
    - locate whereis = Lists all files whose names contain the string "whereis".
  • logout : Logs the current user off the system.
  • ls :  List files
    - ls = List files in the current working directory except those starting with . and only show the file name.
    - ls -al    List all files in the current working directory in long listing format showing permissions, ownership, size, and time and date stamp
  • more : Allows file contents or piped output to be sent to the screen one page at a time.
    - more /etc/profile = Lists the contents of the "/etc/profile" file to the screen one page at a time.
    - ls -al |more  = Performs a directory listing of all files and pipes the output of the listing through more. If the directory listing is longer than a page, it will be listed one page at a time.
  • mv : Move or rename files
    - mv -i myfile yourfile = Move the file from "myfile" to "yourfile". This effectively changes the name of "myfile" to "yourfile".
    - mv -i /data/myfile = Move the file from "myfile" from the directory "/data" to the current working directory. 
  • pwd :  Show the name of the current working directory
    - more /etc/profile = Lists the contents of the "/etc/profile" file to the screen one page at a time.
  • shutdown : Shuts the system down.
    - shutdown -h now = Shuts the system down to halt immediately.
    - shutdown -r now = Shuts the system down immediately and the system reboots.
  • whereis : Show where the binary, source and manual page files are for a command
    - whereis ls = Locates binaries and manual pages for the ls command.
OK basic linux commands for The Young I give can hopefully increase your knowledge about linux .. and attempt try it by you,, good luck

Comments

  1. very informative post for me as I am always looking for new content that can help me and my knowledge grow better.

    ReplyDelete

Post a Comment

Popular posts from this blog

Tutorials of Computer Technology for The Young

Tutorials of Computer Technology for The Young this time I will give to the young in order to find out about computer technology, now you in the right place determines it for can be more.for we all know, technology is now rapidly growing and increasingly sophisticated. here is meant to shed light on the young  the concept of computers. Also this site will prove to be useful for adults who are unaware of computers . if we talk about computer technology may be many different definitions, but at the same goal is an understanding of computers. you try to open your browser must have lots of explanation on this computer, therefore I arrange lessons for you that will take you deep into the world of computers . I recommend that you start from the first and advance step by step.

Logging in and Logout on Linux

So, this time if you have installed linux on your computer, it is very easy to logging in and logout in how your computer. The following means logging in and logout on linux : logging in When you complete installing Linux and booting the system you should see a login prompt on your monitor. When you did your Linux install you should have set a root password. You may have also created a user with a password. Therefore to log in, you will want to type the name of a user or "root" for the login name and enter the appropriate password. If you logged in as a normal user and know the root password and want to use administration commands, you may use the command "su" to become a "super user". Some systems also support the "sudo" command, which allows administrative privileges on a command by command basis. Logging out Use the command "logout" to exit a given session. If you have logged in, then typed "su" to become a superuser

Parts of Computer Technology Basics

Part of Computer Technology Basics it seems you should know if a part of the computer is damaged you be know where the location of the damage. Computers Technology now in circulation are increasingly sophisticated and much in demand by many people, maybe including yourself. you should know in it has an important component. The following P arts of C omputer Technology Basic: 1. Hardware hardware are all part of the physical computer , and are distinguished by the data in it or who operate in it, and are distinguished by the software (software) that provides instructions for the hardware to complete the task. The boundary between hardware and software will be a little blurry when we speak about firmware, because this firmware is software that is "made" into the hardware. This firmware is the area of computer science and computer engineering , which is rarely known by the general user.Just an example below: