Preview

Basic Linux Command

Satisfactory Essays
Open Document
Open Document
359 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Basic Linux Command
Command's Purpose

Linux

Basic Linux Example

Copies files

cp

cp thisfile.txt /home/thisdirectory

Moves files

mv

mv thisfile.txt /home/thisdirectory

Lists files

ls

ls (all information ls –l)

Clears screen

clear

clear

Closes prompt window

exit

exit

Displays or sets date

date

date

Deletes files

rm

rm thisfile.txt

"Echoes" output on the screen

echo

echo this message

Edits files with simple text editor

vi

vi thisfile.txt

Compares the contents of files

diff

diff file1 file2

Finds a string of text in a file

grep

grep this word or phrase thisfile.txt

Formats a diskette

mke2fs (or mformat

/sbin/mke2fs /dev/fd0 (/dev/fd0 is the Linux equivalent of A:)

Displays command help

man

man command

Creates a directory

mkdir

mkdir directory

View a file

less

less thisfile.txt

Renames a file

mv

mv thisfile.txt thatfile.txt[e]

Displays your location in the file system

pwd

pwd

Changes directories with a specified path
(absolute path)

cd pathname

cd /directory/directory

Changes directories with a relative path

cd ..

cd ..

Displays the time

date

date

Shows amount of RAM and use

free

free

add a user to the system

adduser

view all commands starting with x

x then [tab] <beep> [tab]

Make a symbolic link from x to y

ln -s x y

to view all running processes

ps

to terminate process x (x is PID from ps)

kill x

Change file permissions

chmod <permissions> <file>

chmod -R 753 games
Permissions alias weightage read r

4

write

w

2

execute

x

1

In 753, the first 7 (1st letter) represents the permissions to himself, 5 (2nd letter) represents the permissions to group. 3 (3rd letter) represents the permissions to others. Options: -R for whole directory
7=4+2+1 ; 5=4+1; 3=2+1
Change file owner

chown <new owner> <file>

Change file group

chgrp <new group> <file>

Compress/uncompress files/directories

tar

tar -xvf file.tar -- uncompress a file 'file.tar' tar -xzvf file.tar.gz -- uncompress a file 'file.tar.gz' tar -xjvf

You May Also Find These Documents Helpful

  • Satisfactory Essays

    NT1310 Unit 3 Homework

    • 1253 Words
    • 5 Pages

    tem. Each of these numbers identifies the command running in the background. It’s useful to know what jobs the program has completed and which ones are still running. The utility to use to run more than one command is “&”.…

    • 1253 Words
    • 5 Pages
    Satisfactory Essays
  • Powerful Essays

    Unit 3 network discovery

    • 1031 Words
    • 5 Pages

    The shell tries to find an executable program with the same name as the command. When it does, the shell executes the program. When finishing the command put an & ampersand symbol at the end of the command and the command will run in the background. Then a cursor will be displayed immediately to allow the next command to be entered.…

    • 1031 Words
    • 5 Pages
    Powerful Essays
  • Satisfactory Essays

    Unit 10 Assignment 1

    • 469 Words
    • 3 Pages

    I have learned some new terms from this video and how the commands are imperative…

    • 469 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    data and can be initiated from the DOS command prompt? What useful information does this query…

    • 924 Words
    • 4 Pages
    Powerful Essays
  • Satisfactory Essays

    Linux Commands

    • 1489 Words
    • 6 Pages

    Bash command line for Linux a alias Create an alias • apropos Search Help manual pages (man -k) apt-get Search for and install software packages (Debian/Ubuntu) aptitude Search for and install software packages ( Debian/Ubuntu) aspell Spell Checker awk Find and Replace text, database sort/validate/index b basename Strip directory and suffix from filenames bash GNU Bourne-Again SHell bc Arbitrary precision calculator language bg Send to background break Exit from a loop • builtin Run a shell builtin bzip2 Compress or decompress named file(s) c cal Display a calendar case Conditionally perform a command cat Concatenate and print (display) the content of files cd Change Directory cfdisk Partition table manipulator for Linux chgrp Change group ownership chmod Change access permissions chown Change file owner and group chroot Run a command with a different root directory chkconfig System services (runlevel)…

    • 1489 Words
    • 6 Pages
    Satisfactory Essays
  • Powerful Essays

    Argument Assignment Example

    • 9158 Words
    • 26 Pages

    5:30 traffic in Baton Rouge could easily be defined as the time in which no one wants to get in their car and go anywhere regardless of urgency. Baton Rouge, Louisiana is notoriously known for their inefficient traffic systems. Why is that? With a population rank of 67th in the United States, Baton Rouge’s ranking of 33rd in the nation for worst traffic congestion has definitely impacted the community’s identity (Meaux, Reveille).…

    • 9158 Words
    • 26 Pages
    Powerful Essays
  • Good Essays

    Any Bad Moment

    • 2957 Words
    • 12 Pages

    | (copy out) cpio -o reads the standard input to obtain a list of path names and copies those files onto the standard output.…

    • 2957 Words
    • 12 Pages
    Good Essays
  • Satisfactory Essays

    Verilog

    • 317 Words
    • 2 Pages

    * The basic module of the adc will have an input, an output and a clock (clk) as part of the port list.…

    • 317 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    How to Give Instructions

    • 535 Words
    • 3 Pages

    2.The teacher says that they are going to learn imperative verb forms and body parts.…

    • 535 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    |Change the permissions on this new file to add the execute bit for user, group, and owner. |…

    • 511 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    C Program

    • 2161 Words
    • 9 Pages

    // This file is a good place to add code for any additional processing that is…

    • 2161 Words
    • 9 Pages
    Powerful Essays
  • Good Essays

    Java Programming Questions

    • 1971 Words
    • 8 Pages

    Using a case statement, write a shell program to read a command (eg., who, cal, ls, ps) from the user and execute it.…

    • 1971 Words
    • 8 Pages
    Good Essays
  • Powerful Essays

    Basic Computer

    • 1446 Words
    • 6 Pages

    in the major financial markets operating a network of around 600 offices in 20 countries in the…

    • 1446 Words
    • 6 Pages
    Powerful Essays
  • Satisfactory Essays

    Identifiers are names that are given to various program elements, such as variable, function and arrays. C take some reserved word called keyword, they have predefine meaning in C. Identifiers consist of letters and digits. Keyword consist only letter. Identifier’s first character must be a letter. Keyword’s all character is letter. Identifiers Upper and lowercase letter is use. Keywords are all lowercase. Upper and lowercase are not equivalent. Upper and lowercase are also not equivalent. Like: X, sum_5, _weather etc.…

    • 449 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Good Command for English

    • 259 Words
    • 2 Pages

    Now, the world is becoming smaller than before just because of advancement of technology and knowledge. Every person has different ideas, knowledge and strength and wants to share them with other person.There is no accepted and established common language for all other than English. This is medium language between to languages and cultures. In the course of our business or work, any where in the world, there is always possibility to come across with the people of different languages and cultures and we can simplify this situation with the help of English.We can do nothing, without having a good command of English, if we intend to do something good we like, coming out from our home.…

    • 259 Words
    • 2 Pages
    Satisfactory Essays

Related Topics