LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices


Reply
  Search this Thread
Old 04-22-2019, 05:09 AM   #1
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Rep: Reputation: 28
Can terminal work in different partition


I have dual boot and want to use a terminal in the Windows partition.

Any way I can use the terminal to access the windows partition?

Or can I use the Windows terminal from the Linux?
 
Old 04-22-2019, 05:47 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,129

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
"use a terminal" is meaningless. Mount the partition - run ls on the mountpoint. Is that what you want ?.
 
1 members found this post helpful.
Old 04-22-2019, 10:02 AM   #3
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by syg00 View Post
"use a terminal" is meaningless. Mount the partition - run ls on the mountpoint. Is that what you want ?.
How do I do that? The terminal comes up on the Linux Partition and starts at the Home directory ls just lists the home directory on the Linux partition.
 
Old 04-22-2019, 10:22 AM   #4
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,496

Rep: Reputation: Disabled
You need to mount the other partition, then you should be able to work on the files that are on it, by using the long name to the files, or via a file manager.

But beware, Linux & Windows use different line endings in their editors, & you may get permissions problems.

You may need to install ntfs-3g to be able to write files to your Windows partition.

Check out about mounting partitions online if you aren't sure of what you need to do.
(Or take a look at man mount.)
 
1 members found this post helpful.
Old 04-22-2019, 10:31 AM   #5
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by bscho View Post
I have dual boot and want to use a terminal in the Windows partition.

Any way I can use the terminal to access the windows partition?

Or can I use the Windows terminal from the Linux?
As syg00 says, this question is unclear. But now I see that fatmac has followed up similar to what I was thinking, but I also have some additional thoughts to offer.

When you are booted in Linux, you can "see" the Windows directories, provided that partition is mounted.

Also when you are booted in Linux, the terminal program you run is Linux based and uses Linux commands. You will be able to go to the Windows directory structure in there, providing it is mounted and you know the directory where it is located.

When you are booted in Windows, the terminal program you run is the Windows Command Prompt, which behaves much like the former DOS prompt. You will not be able to see any of the Linux file systems in that case.

You cannot use the Linux terminal from within Windows, however you can install software which emulates the behavior of a Linux terminal, under your Windows OS. On typical program that allows this is called cygwin.

What we really need to hear is what exactly you want to do. What commands you wish to enter and use against files in your Windows directory structure.
 
Old 04-22-2019, 10:36 AM   #6
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by rtmistler View Post
As syg00 says, this question is unclear. But now I see that fatmac has followed up similar to what I was thinking, but I also have some additional thoughts to offer.


What we really need to hear is what exactly you want to do. What commands you wish to enter and use against files in your Windows directory structure.
Yes I want to remove the Windows password SAM and reinstall one that has no password.
For those who have forgotten the password.

Not sure what would happen if I just deleted the Sam file?

I will also need to chmod the file as it is read only.
 
Old 04-22-2019, 11:14 AM   #7
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by fatmac View Post
You need to mount the other partition, then you should be able to work on the files that are on it, by using the long name to the files, or via a file manager.
I tried to mount the windows partition but it says cannot find /etc/fstab

Any ideas?
 
Old 04-22-2019, 11:25 AM   #8
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Yes, you'd have to specify the mount location where you wish to mount it.

Typically you would also need to use sudo to prefix the mount command.
Code:
$ sudo mount -t ntfs-3g <partition path> <mount directory>
And you'd need to have the ntfs-3g package, as stated by fatmac. <partition-path> is the location where your Windows partition is located, something like /dev/sdb1 but matching the location where it really is on your system. The <mount-directory> is a directory you created to be the mountpoint for the file system.
 
Old 04-22-2019, 11:25 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,855

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
Quote:
Originally Posted by bscho View Post
I tried to mount the windows partition but it says cannot find /etc/fstab

Any ideas?
Please explain exactly what did you try. I mean how did you try to mount that windows partition? Please post exactly the commands you executed and the responses.

It looks like your original question is still unclear, I would like to ask you to explain what do you want to achieve.
Would be nice to give more details on how do you "want to use a terminal in the Windows partition." (what do you mean by that)
 
Old 04-22-2019, 11:34 AM   #10
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by pan64 View Post
Please explain exactly what did you try. I mean how did you try to mount that windows partition? Please post exactly the commands you executed and the responses.
sudo mount -t ntfs computer:///Hitachi%20HTS547550A9E384.drive
[sudo] password for user:
mount: computer:///Hitachi%20HTS547550A9E384.drive: can't find in /etc/fstab.
user@user-Extensa-5630:~$

Probably doing everything wrong. I tried to use a directory but it could not find a directory on my linux.
 
Old 04-22-2019, 11:35 AM   #11
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,855

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
you need to mkdir <mount point> (this is a directory which will be used for that mount
Code:
# add this directory to the end of that command:
sudo mount -t ntfs computer:///Hitachi%20HTS547550A9E384.drive <mount point>
I have no idea what is that computer:///Hitachi%20HTS547550A9E384.drive, probably you need to replace it with something like
/dev/sdb1 or similar. Is this a local or remote disk?

Last edited by pan64; 04-22-2019 at 11:36 AM.
 
Old 04-22-2019, 11:35 AM   #12
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
You need to run fdisk -l (that's letter L, lowercase) to get a report on all the partitions in your system, and look for one which is NT file type, to understand where the partition is located.
 
Old 04-22-2019, 11:38 AM   #13
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by rtmistler View Post
You need to run fdisk -l (that's letter L, lowercase) to get a report on all the partitions in your system, and look for one which is NT file type, to understand where the partition is located.
Did that shows
sudo mount -t ntfs computer:///Hitachi%20HTS547550A9E384.drive
[sudo] password for user:
mount: computer:///Hitachi%20HTS547550A9E384.drive: can't find in /etc/fstab.
user@user-Extensa-5630:~$


Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 206847 204800 100M 7 HPFS/NTFS/exFAT
/dev/sda2 206848 306419711 306212864 146G 7 HPFS/NTFS/exFAT
/dev/sda3 306421758 976771071 670349314 319.7G 5 Extended
/dev/sda5 968531968 976771071 8239104 4G 82 Linux swap / Solaris
/dev/sda6 306421760 968531967 662110208 315.7G 83 Linux

Partition table entries are not in disk order.




Disk /dev/sdb: 58.6 GiB, 62889394176 bytes, 122830848 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc29982a3

Device Boot Start End Sectors Size Id Type

/dev/sdb1 2048 122830847 122828800 58.6G c W95 FAT32 (LBA)


This is /etc/fstab

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda6 during installation
UUID=566bba7f-f3e8-4780-bb20-8d4dae310515 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=24e1bdf5-0601-43e3-a066-b7172191a690 none swap sw 0 0
/dev/disk/by-label/CDROM /mnt/CDROM bootable nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-id/usb-Generic_Flash_Disk_A5487656-0:0-part1 /mnt/usb-Generic_Flash_Disk_A5487656-0:0-part1 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-id/usb-Sunzong_Easy_F_1.0A_ZPG_201702160000000D-0:0 /mnt/usb-Sunzong_Easy_F_1.0A_ZPG_201702160000000D-0:0 auto nosuid,nodev,nofail,noauto,x-gvfs-show 0 0

So It has no NTFS file system so that is weird

Last edited by bscho; 04-22-2019 at 11:54 AM.
 
Old 04-22-2019, 11:40 AM   #14
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,855

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
and again, please post exactly what did you execute and what was the result.
 
Old 04-22-2019, 11:57 AM   #15
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by pan64 View Post
and again, please post exactly what did you execute and what was the result.
Did this
sudo mount -t ntfs computer:///Hitachi%20HTS547550A9E384.drive
[sudo] password for user:
mount: computer:///Hitachi%20HTS547550A9E384.drive: can't find in /etc/fstab.
user@user-Extensa-5630:~$

also I used
sudo mount -t ntfs /dev/sda2
[sudo] password for user:
mount: /dev/sda2: can't find in /etc/fstab.
user@user-Extensa-5630:~$

No entry in fstab

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda6 during installation
UUID=566bba7f-f3e8-4780-bb20-8d4dae310515 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=24e1bdf5-0601-43e3-a066-b7172191a690 none swap sw 0 0
/dev/disk/by-label/CDROM /mnt/CDROM bootable nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-id/usb-Generic_Flash_Disk_A5487656-0:0-part1 /mnt/usb-Generic_Flash_Disk_A5487656-0:0-part1 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-id/usb-Sunzong_Easy_F_1.0A_ZPG_201702160000000D-0:0 /mnt/usb-Sunzong_Easy_F_1.0A_ZPG_201702160000000D-0:0 auto nosuid,nodev,nofail,noauto,x-gvfs-show 0 0
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Authentication failure/ I tryed 3 authentic passwords but none work in terminal. don't know how to install vlc without terminal. so please elneuma Linux - Desktop 2 12-12-2016 01:40 PM
[SOLVED] Using DD to transfer one partition to another different size partition zemir Linux - Newbie 7 07-30-2011 06:46 AM
cloning linux partition to different laptop, invalid partition table dsollen Linux - Software 8 11-23-2009 08:50 PM
Copy Contents of LVM Partition to Another Partition With a Different File System tmort Linux - General 3 03-07-2008 05:00 AM
Unable to Resize NTFS partition with 4 different partition editors Alexandrian Linux - Newbie 11 05-19-2006 06:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint

All times are GMT -5. The time now is 07:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration