Basic Linux Commands

Below are basic linux command which may be useful for VLSI Engineers while working in linux OS and EDA tools.
1. ls : list files and directories
   ls -a : shows the hidden files/directories
   ls -t : lists the files/directories on the basis of modification time  
   ls -l : indicates files/directories types,permissions,owner,size
2. clear : clear the terminal
3. man :  It displays the whole manual of the command
4. cd : change directory
   cd .. : back to parent directory
   cd .  : back to previous directory
   cd ~ : go to home directory
5. pwd : present working directory
6. mkdir : create directory
    mkdir directory_name
7. rmdir : delete directory
    rmdir directory_name
8. touch : create a file
    touch file_name
    touch-a file_name : to change the file access time
    touch-m file_name to change the file modification time
    touch file1 file 2 to create multiple files
9. cp : copy command
    cp <existing file_name> <new file_name>
10. mv : move command
     mv-rf : recursive and force moving of a directory
11. vi file_name : create and edit a file using command prompt
       i : insert the text
       Esc+ :q : exit with saving
       Esc+ :s : save only not exit
       Esc+ :wq : save and exit
12. cat : stands for concatenate
       cat file_name : It will display the content of file
       cat -n file_name : It will display file with line number
       cat file1 >> file2 : Will append the contents of one file to the end of another file
13. who : Used to get information about currently logged in user on to system
14. whoami : Displays the username of the current user when this command is invoked
15. chmod : change the access mode of a file
      ls -l file_name : see the current permission of file
      chmod 777  file_name : set all permissions for all users
      chmod 754  file_name set rwx for owner ,r-x for group and r-- for others
      r: read
      w: write
      x: execute
16. chown : Used to change the file Owner or group
17. echo : Used to display line of text/string that are passed as an argument
18. exit : Used to exit the shell where it is currently running
19. history :  used to view the previously executed command
20. head : To read the first 10 line in command line
       head file_name : To read the first 10 lines of a file
       head -n 6 file_name : To read the first 6 lines of a file
21. tail : To read the last 10 line in command line
       tail file_name : To read the last 10 lines of file
       tail -n 9 file_name : To read the last 9 lines of a file
22. sortUsed to sort a file, arranging the records in a particular order
         sort file_name : sort the content of file
         sort -n file_name : sorting a file which has numbers
         sort -r file_name : sorting a file in reverse order
23. more : display text one screen at a time
24. less : Used to read contents of text file one screen per time
25. wc : Used to find out number of lines, word count and characters count in the files
         wc -l file_name : To count number of lines in a file
         wc -w file_name : To count number of words in a file
         wc -c file_name : To count number of characters in a file
26. diff : Used to display the differences in the files by comparing the files line by line
         diff file1 file 2 : to check the difference between two files
27. dir : Used to list the contents of a directory
28. kill : Used to terminate processes manually. kill command sends a signal to a process which terminates the process
29. ps : Used to list the currently running processes and their PIDs along with some other information depends on different options
30. top : displays all the running process within the environment of your system
31. uptime : Used to find out how long the system is running
32. users : Used to show the user names of users currently logged in to the current host
33. w : Used to show who is logged on and what they are doing
34. shutdown : Used to shutdown the system in a safe way
35. reboot : Instructs the system to restart or reboot
36. passwd : Used to change the user account passwords
37. lshw : Used to check the hardware information
38. date : Used to show the system date and time
39. cal : It display current month’s calendar as output
40. ping : Used to check the network connectivity between host and server
41. ifconfig : Used to configure the kernel-resident network interfaces
42. host : Used for DNS lookup operations
43. hostid : displays the host ID in hexadecimal format
44. hostname : To know the hostname
45. uname : Displays the information about the system
       uname -a : It prints all the system information like: Kernel namenetwork node hostnamekernel release datekernel versionmachine hardware namehardware platformoperating system  
            uname -s :  It prints the kernel name
            uname -n :  It prints the the hostname of the network node
            uname -r :  It prints the kernel release date
            uname -v :  It prints the kernel version
46. env : Used to print all the current environment variables
47. grep : Searches a file for a particular pattern of characters, and displays all lines that contain that pattern
           grep options pattern file_name
           grep -i words file_name : display the lines contains searched words
           grep -c pattern file_name : It prints only a count of the lines that match a pattern
           grep -l pattern file1 file2 display the files that contains the given pattern
           grep -w words file_name display the lines contains searched whole words
           grep -o pattern file_name display only the matched pattern
           grep -n pattern file_name show the line number of file with the line matched
           grep -v pattern file_name : It prints out all the lines that do not matches the pattern
48. sed :  stands for stream editor and used for finding,text substitution, replacement etc
49. iwconfig : Used to display the parameters, and the wireless statistics which are extracted from /proc/net/wireless
50. ip address : display all IP addresses
SHARE

vlsi4freshers

Hi I’m Designer of this blog.

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment